cancel
Showing results for 
Search instead for 
Did you mean: 

purchase process design

learner
Champ in-the-making
Champ in-the-making
hello,
my business proccessSmiley Tongueurchase process have  2 activity :establishment of good order,and validation the order. i want to design a form in eclipse activiti which include :
establishment of good order:
<activiti:formProperty id="Réference" name="Réference" type="string" required="true"></activiti:formProperty>
        <activiti:formProperty id="date de commande" name="date de commande" type="date" datePattern="dd-MM-yyyy hh:mm"></activiti:formProperty>
<activiti:formProperty id="Produit" name="Produit" type="string" required="true"></activiti:formProperty>
        <activiti:formProperty id="Quantité" name="Quantité" type="string"></activiti:formProperty>
  <activiti:formProperty id="Prix unitaire" name="Prix unitaire" type="string"></activiti:formProperty>
validation the order:
</userTask>
    <userTask id="usertask3" name="valider la commande" activiti:assignee="kermit">
      <documentation>liste of product to order:${Produit} </documentation>
—–
my problem in one purchase order they are many product to order, i need help to design a  form which include a list of product to order refer to one order reference,and a second form: the validation purchase order activity which displays this list,i dont' know what kind of :formPropertyto do that.
help me please;thanks
10 REPLIES 10

learner
Champ in-the-making
Champ in-the-making
attachement

trademak
Star Contributor
Star Contributor
The best way would be to implement your own custom form type. Will you be using the Activiti Explorer or a custom application?

Best regards,

learner
Champ in-the-making
Champ in-the-making
I' using the activiti expolorer, i try to design 2 activiti usertask: one include Smiley Tongueroduct;Quantiti,price; this activity related to another activity include Ref order ,which can display the liste of product in this order;
————
<userTask id="cmd" name="cmd" activiti:assignee="kermit">
      <extensionElements>
        <activiti:formProperty id="Pduit" name="Pduit"></activiti:formProperty>
        <activiti:formProperty id="Qte" name="Qte"></activiti:formProperty>
        <activiti:formProperty id="MT" name="MT"></activiti:formProperty>
      
      </extensionElements>
    </userTask>
    <endEvent id="endevent1" name="End"></endEvent>
    <userTask id="Tcmd" name="Tcmd" activiti:assignee="kermit">
      <documentation>
</documentation>
      <extensionElements>
        <activiti:formProperty id="REF" name="REF"></activiti:formProperty>
        <activiti:formProperty id="liste" name="liste" expression="${Pduit}" writable="false"></activiti:formProperty>
      </extensionElements>
    </userTask>
—————-
but expression="${Pduit}"  on activiti explorer return just the last product not all the product…

how can I  resolve this problem ?
thanks

learner
Champ in-the-making
Champ in-the-making
att

frederikherema1
Star Contributor
Star Contributor
When you use a form to fill in properties, the values are set on the process as a variable. When you use the same form property again, the value that is already present is overridden. You should build some logic (e.g.. service-task, script-task or task-listener) that copies the filled in values to another data-structure (eg. create POJO's passed on that and add it to a list that is stored as process-variable).

learner
Champ in-the-making
Champ in-the-making
I'm a beginner  and  this explanation made me clear how to find the solution ,I will learn more about POJO;
if possible please send me a simple example  to better understand 
thank you very much

jbarrez
Star Contributor
Star Contributor
Check the docs or our unit tests, or just try to put a pojo in the variables

sarra1
Champ in-the-making
Champ in-the-making
I found an example in org.activiti.examples.bpmn.expression ;which include a Simple POJO, just for test purposes, I run the unit test and it's ok : no error, but when I deploy the process in activiti explorer  a  warning message appears : Unknown property used in expression: ${order.price<=250}
how can I solve this problem ? thanks

sarra1
Champ in-the-making
Champ in-the-making
xml file att