<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Programmatically Create Activiti Pool, Lane using java code in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/programmatically-create-activiti-pool-lane-using-java-code/m-p/196160#M149290</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The pool should have a reference to the process identifier with the setProcessRef method.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And you should add the pool to the BpmnModel.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Finally the process instance id should be the same as the pool process reference.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Jul 2014 12:22:36 GMT</pubDate>
    <dc:creator>trademak</dc:creator>
    <dc:date>2014-07-22T12:22:36Z</dc:date>
    <item>
      <title>Programmatically Create Activiti Pool, Lane using java code</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/programmatically-create-activiti-pool-lane-using-java-code/m-p/196157#M149287</link>
      <description>Hi,&amp;nbsp;&amp;nbsp;&amp;nbsp; I have tried to create and add Pool and Lane to a model within a sample activiti java program. Can anybody help on how to programmatically create Pool and Lane using java code. thanksSud</description>
      <pubDate>Mon, 21 Jul 2014 10:16:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/programmatically-create-activiti-pool-lane-using-java-code/m-p/196157#M149287</guid>
      <dc:creator>smadhu</dc:creator>
      <dc:date>2014-07-21T10:16:08Z</dc:date>
    </item>
    <item>
      <title>Re: Programmatically Create Activiti Pool, Lane using java code</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/programmatically-create-activiti-pool-lane-using-java-code/m-p/196158#M149288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You mean using the BpmnModel approach? or something else?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2014 10:10:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/programmatically-create-activiti-pool-lane-using-java-code/m-p/196158#M149288</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2014-07-22T10:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: Programmatically Create Activiti Pool, Lane using java code</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/programmatically-create-activiti-pool-lane-using-java-code/m-p/196159#M149289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes. I wrote a sample java class with the BpmnModel, and tried adding a Pool and then also a lane. But it just fails at the last line of the following code with a message error creating XML.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;BpmnModel model = new BpmnModel();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Process process = new Process();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;model.addProcess(process);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;process.setId(processName);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;// Progammatically creating lanes seems an issue , commented to make the code compile and run&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;//Lane tempLane = new Lane();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;//Pool tempPool = new Pool(); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;//tempLane.setParentProcess(process);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;//process.getLanes().add(tempLane);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;process.addFlowElement(createStartEvent();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;process.addFlowElement(createUserTask();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;process.addFlowElement(createEndEvent());&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;RepositoryService repositoryService = processEngine.getRepositoryService();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;RuntimeService runtimeService = processEngine.getRuntimeService();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Deployment deployment = repositoryService.createDeployment().addBpmnModel(bpmnModelName, model).name(description).deploy();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(processName);&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;//Fails on the below line with a message error creating XML&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;InputStream processDiagram = processEngine.getRepositoryService().getProcessDiagram(processInstance.getProcessDefinitionId());&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FileUtils.copyInputStreamToFile(processDiagram, new File(diagramFileName));&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2014 12:04:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/programmatically-create-activiti-pool-lane-using-java-code/m-p/196159#M149289</guid>
      <dc:creator>smadhu</dc:creator>
      <dc:date>2014-07-22T12:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: Programmatically Create Activiti Pool, Lane using java code</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/programmatically-create-activiti-pool-lane-using-java-code/m-p/196160#M149290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The pool should have a reference to the process identifier with the setProcessRef method.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And you should add the pool to the BpmnModel.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Finally the process instance id should be the same as the pool process reference.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2014 12:22:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/programmatically-create-activiti-pool-lane-using-java-code/m-p/196160#M149290</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2014-07-22T12:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: Programmatically Create Activiti Pool, Lane using java code</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/programmatically-create-activiti-pool-lane-using-java-code/m-p/196161#M149291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I will try your suggestion and get back to you. Can you also suggest is it possible to display labels on SequenceFlow. I tried adding in the setName(), though it gets generated and Iam able to see the same in the XML, but the label does not display on the generated PNG diagram.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But when I try to add a Name to a SequenceFlow from the Activiti Designer, it appears in the diagram. Perfect. Why does it not display the label when it is set from java code. Whats the difference ? and can you please guide me ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jul 2014 05:15:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/programmatically-create-activiti-pool-lane-using-java-code/m-p/196161#M149291</guid>
      <dc:creator>smadhu</dc:creator>
      <dc:date>2014-07-23T05:15:27Z</dc:date>
    </item>
    <item>
      <title>Re: Programmatically Create Activiti Pool, Lane using java code</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/programmatically-create-activiti-pool-lane-using-java-code/m-p/196162#M149292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;&amp;gt; but the label does not display on the generated PNG diagram.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;No, it doesn't do that yet.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2014 08:02:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/programmatically-create-activiti-pool-lane-using-java-code/m-p/196162#M149292</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2014-07-25T08:02:30Z</dc:date>
    </item>
  </channel>
</rss>

