cancel
Showing results for 
Search instead for 
Did you mean: 

i want to fetch data from mysql database in form fields and insert data

heba
Champ in-the-making
Champ in-the-making
i made a simple example to fetch and insert data in database but there is no results

and this is my workflow xml 

———————-
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlnsSmiley Surprisedmgdc="http://www.omg.org/spec/DD/20100524/DC" xmlnsSmiley Surprisedmgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
  <process id="myProcess1" name="My process" isExecutable="true">
    <endEvent id="endevent1" name="End"></endEvent>
    <startEvent id="startevent2" name="Start">
      <extensionElements>
        <activiti:formProperty id="name" name="Name" type="string" default="sql_ui: SELECT `FIRST_` FROM `act_id_user` WHERE `ID_`='heba'" required="true"></activiti:formProperty>
      </extensionElements>
    </startEvent>
    <userTask id="usertask1" name="User Task" activiti:candidateGroups="admin">
      <documentation>${name}</documentation>
      <extensionElements>
        <activiti:formProperty id="name1" name="Name" type="string" default="SELECT `FIRST_` FROM `act_id_user` WHERE `ID_`='heba'"></activiti:formProperty>
        <activiti:taskListener event="create" expression="sql:INSERT INTO `order`(`layerId`, `orderNo`, `userId`) VALUES (2,6,'${name}');"></activiti:taskListener>
      </extensionElements>
    </userTask>
    <sequenceFlow id="flow5" sourceRef="usertask1" targetRef="endevent1"></sequenceFlow>
  </process>
2 REPLIES 2

heba
Champ in-the-making
Champ in-the-making
this is my workflow xml what can i do to run ?

heba
Champ in-the-making
Champ in-the-making
<code>
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlnsSmiley Surprisedmgdc="http://www.omg.org/spec/DD/20100524/DC" xmlnsSmiley Surprisedmgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
  <process id="myProcess1" name="My process" isExecutable="true">
    <endEvent id="endevent1" name="End"></endEvent>
    <startEvent id="startevent2" name="Start">
      <extensionElements>
        <activiti:formProperty id="name" name="Name" type="string" default="sql_ui: SELECT `FIRST_` FROM `act_id_user` WHERE `ID_`='heba'" required="true"></activiti:formProperty>
      </extensionElements>
    </startEvent>
    <userTask id="usertask1" name="User Task" activiti:candidateGroups="admin">
      <documentation>${name}</documentation>
      <extensionElements>
        <activiti:formProperty id="name1" name="Name" type="string" default="SELECT `FIRST_` FROM `act_id_user` WHERE `ID_`='heba'"></activiti:formProperty>
        <activiti:taskListener event="create" expression="sql:INSERT INTO `order`(`layerId`, `orderNo`, `userId`) VALUES (2,6,'${name}');"></activiti:taskListener>
      </extensionElements>
    </userTask>
    <sequenceFlow id="flow5" sourceRef="usertask1" targetRef="endevent1"></sequenceFlow>
  </process>
</code>