<?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: How to get already Deployed Process Definition in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-already-deployed-process-definition/m-p/8034#M3639</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have already checked the xml and it seem fine. And also the same code is working properly if i execute it in one go. Means once i deploy process definition and at the same time claiming the task then it is working fine. &amp;nbsp;But it is not working when i deployed process definition and trying to claim it after getting the already deployed definition which is stored in database. So as you can see in error logs , xml parsing failed. So I'm thinking that it is possible that my code is not able to get the parsed xml which is already deployed in previous step.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's why my question was : how can i get already deployed and parsed process definition at any time. Because there may be chance that i have deployed more than 1 process definition. And next time i want to get create repositoryservice object which refer to one of the process definition which is already deployed by me having some id.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope now you got my point. Plz help me out of this problem. You can see my code provided above. I know that there is something missing in my code because of which repositoryservice is not able to find parsed xml.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Aug 2017 14:19:45 GMT</pubDate>
    <dc:creator>pjainiit</dc:creator>
    <dc:date>2017-08-10T14:19:45Z</dc:date>
    <item>
      <title>How to get already Deployed Process Definition</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-already-deployed-process-definition/m-p/8030#M3635</link>
      <description>I want to get already&amp;nbsp;Deployed Process Definition. I have created process in which there are 2 group and each group contains some user.once a user logged in , one process is started by a user of first group and then he logged out.After that second user logged in and claim the task which was started</description>
      <pubDate>Fri, 04 Aug 2017 08:30:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-already-deployed-process-definition/m-p/8030#M3635</guid>
      <dc:creator>pjainiit</dc:creator>
      <dc:date>2017-08-04T08:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to get already Deployed Process Definition</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-already-deployed-process-definition/m-p/8031#M3636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The error you are seeing is '&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;Content is not allowed in prolog' so maybe&amp;nbsp;you're hitting the same issue as&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/thread/223864"&gt;New process definition deployment&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2017 10:54:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-already-deployed-process-definition/m-p/8031#M3636</guid>
      <dc:creator>ryandawson</dc:creator>
      <dc:date>2017-08-09T10:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to get already Deployed Process Definition</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-already-deployed-process-definition/m-p/8032#M3637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry but i didn't get you. What do you mean by same issue. ? Can plz provide or suggest solution to resolve this error. This error occur only at the time of claiming or completing the task. If i get list of pending task then it work fine.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Aug 2017 12:11:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-already-deployed-process-definition/m-p/8032#M3637</guid>
      <dc:creator>pjainiit</dc:creator>
      <dc:date>2017-08-10T12:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to get already Deployed Process Definition</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-already-deployed-process-definition/m-p/8033#M3638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm suggesting that the process definition's xml may contain a non-standard character which can't be read like in the example referenced in the other thread.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Aug 2017 12:34:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-already-deployed-process-definition/m-p/8033#M3638</guid>
      <dc:creator>ryandawson</dc:creator>
      <dc:date>2017-08-10T12:34:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to get already Deployed Process Definition</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-already-deployed-process-definition/m-p/8034#M3639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have already checked the xml and it seem fine. And also the same code is working properly if i execute it in one go. Means once i deploy process definition and at the same time claiming the task then it is working fine. &amp;nbsp;But it is not working when i deployed process definition and trying to claim it after getting the already deployed definition which is stored in database. So as you can see in error logs , xml parsing failed. So I'm thinking that it is possible that my code is not able to get the parsed xml which is already deployed in previous step.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's why my question was : how can i get already deployed and parsed process definition at any time. Because there may be chance that i have deployed more than 1 process definition. And next time i want to get create repositoryservice object which refer to one of the process definition which is already deployed by me having some id.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope now you got my point. Plz help me out of this problem. You can see my code provided above. I know that there is something missing in my code because of which repositoryservice is not able to find parsed xml.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Aug 2017 14:19:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-already-deployed-process-definition/m-p/8034#M3639</guid>
      <dc:creator>pjainiit</dc:creator>
      <dc:date>2017-08-10T14:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to get already Deployed Process Definition</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-already-deployed-process-definition/m-p/8035#M3640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's also possible that the&amp;nbsp;code being used to retrieve the process definition at runtime isn't the same as the code that reads it when it is first deployed so it might be that it is parsed ok at deployment but not at runtime. If that were the case it might&amp;nbsp;be possible for it to be a stray character/encoding problem. You seem to be suggesting that you're making the call to retrieve the process definition incorrectly. I&amp;nbsp;presume you've got code being invoked from the process that does that and that's where the stacktrace is from. I see that the error ends with&amp;nbsp;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;findDeployedProcessDefinitionById and that seems correct to me (see&amp;nbsp;&lt;A __default_attr="215864" __jive_macro_name="thread" _jive_internal="true" class="jive_macro_thread jive_macro link-titled" href="https://community.alfresco.com/thread/215864-getting-deployed-process-from-repositoryruntimeservice" rel="nofollow noopener noreferrer"&gt;&lt;/A&gt;&amp;nbsp;). I'm afraid I'm not sure if I'm understanding the distinction between the cases in which it is working and not working for you? Do you mean that there is a condition under which you are able to read the process definition at runtime?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Aug 2017 16:56:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-already-deployed-process-definition/m-p/8035#M3640</guid>
      <dc:creator>ryandawson</dc:creator>
      <dc:date>2017-08-10T16:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to get already Deployed Process Definition</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-already-deployed-process-definition/m-p/8036#M3641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes. You got my point. The problem is with&amp;nbsp;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;&lt;STRONG&gt;findDeployedProcessDefinitionById&lt;/STRONG&gt;. And I already found the link provided you&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/thread/215864"&gt;Getting 'deployed' process from Repository/RuntimeService&lt;/A&gt;&amp;nbsp; but I am not able to understand&amp;nbsp;the solution.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;Below is my code and process definition xml.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #727174;"&gt;&lt;STRONG&gt;When First user logged In below code runs fines.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #727174;"&gt;&lt;STRONG&gt;STEP 1 : ( This code is working fine)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;String userId = "xyz";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;// Configure Process Engine by Database connection&lt;BR /&gt; ProcessEngineConfiguration processEngineConfiguration = ProcessEngineConfiguration&lt;BR /&gt; .createStandaloneProcessEngineConfiguration().setDatabaseType("postgres")&lt;BR /&gt; .setJdbcDriver("org.postgresql.Driver").setJdbcUsername("abcd").setJdbcPassword("abcd@123")&lt;BR /&gt; .setJdbcUrl("jdbc&lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://connect.hyland.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;ostgresql://127.0.0.1:5432/xyz");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Create Process Engine that connect to DB&lt;BR /&gt; ProcessEngine processEngine = processEngineConfiguration.buildProcessEngine();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Create repository service and deploy with process xml.&lt;BR /&gt; RepositoryService repositoryService = processEngine.getRepositoryService();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try {&lt;BR /&gt; repositoryService.createDeployment().tenantId(orgId)&lt;BR /&gt; .addInputStream("abcd.bpmn20.xml",&lt;BR /&gt; new FileInputStream(new File(&lt;BR /&gt; "/home/gladiris/Project/workspace/abcd/resource/abcd.bpmn20.xml")))&lt;BR /&gt; .deploy();&lt;BR /&gt; } catch (FileNotFoundException e) {&lt;BR /&gt; System.out.println("Error");&lt;BR /&gt; e.printStackTrace();&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Everything related to the runtime state of processes can be found in&lt;BR /&gt; // the RuntimeService.&lt;BR /&gt; RuntimeService runtimeService = processEngine.getRuntimeService();&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; ProcessInstance processInstance = runtimeService.startProcessInstanceByKeyAndTenantId("ABCD", "tenantId");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;String processIntanceId = processInstance.getId();&lt;BR /&gt; TaskService taskService = processEngine.getTaskService();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Fetch all tasks for the logged in user&lt;BR /&gt; Task task = taskService.createTaskQuery().taskTenantId(&lt;SPAN&gt;"tenantId"&lt;/SPAN&gt;).taskCandidateUser("firstUser")&lt;BR /&gt; .processInstanceId(processIntanceId).singleResult();&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; taskService.claim(task.getId(), userId);&lt;BR /&gt; taskService.complete(task.getId());&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Now first user is logged out and second user logged In and trying to get process definition deployed in STEP 1 and continue to work which was now in task list of second user.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Below is the code which is giving error because it is not able to get process definition which is deployed in STEP 1.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;STEP 2 : ( Below is the &amp;nbsp;Giving error)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ProcessEngineConfiguration processEngineConfiguration = ProcessEngineConfiguration&lt;BR /&gt; .createStandaloneProcessEngineConfiguration().setDatabaseType("postgres")&lt;BR /&gt; .setJdbcDriver("org.postgresql.Driver").setJdbcUsername("abcd").setJdbcPassword("abcd@123")&lt;BR /&gt; .setJdbcUrl("jdbc&lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://connect.hyland.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;ostgresql://127.0.0.1:5432/xyz");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Create Process Engine that connect to DB&lt;BR /&gt;ProcessEngine processEngine&amp;nbsp;= processEngineConfiguration.buildProcessEngine();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// I'll get&lt;SPAN&gt;processIntanceId from DB.&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;String&amp;nbsp;&lt;SPAN&gt;processIntanceId = "1";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;// I think some code need to be insert here through which I can get Process definition having same process instance Id and tenant Id&amp;nbsp;which was deployed in // STEP 1. ( Something like the link you have provided &lt;A href="https://migration33.stage.lithium.com/thread/215864"&gt;Getting 'deployed' process from Repository/RuntimeService&lt;/A&gt;&amp;nbsp;) .&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;// If possible can you provide the code which need to be put here.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;TaskService taskService = processEngine.getTaskService();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Task task =&lt;SPAN&gt;taskService&lt;/SPAN&gt;.createTaskQuery().taskTenantId("tenantId").taskCandidateUser("secondUser").processInstanceId(processIntanceId).singleResult();&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;// At the time of claiming the task. Above mentioned error occured&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;taskService&lt;/SPAN&gt;.claim(task.getId(), userId);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;// Below is the Process Definition I am using. ( I have made some changes in name and Id so if something mismatch , Ignore it)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;definitions xmlns="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.omg.org/spec/BPMN/20100524/MODEL" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.omg.org/spec/BPMN/20100524/MODEL&lt;/A&gt;&lt;SPAN&gt;" xmlns:xsi="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema-instance" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/A&gt;&lt;SPAN&gt;" xmlns:xsd="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.w3.org/2001/XMLSchema&lt;/A&gt;&lt;SPAN&gt;" xmlns:activiti="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://activiti.org/bpmn" rel="nofollow noopener noreferrer" target="_blank"&gt;http://activiti.org/bpmn&lt;/A&gt;&lt;SPAN&gt;" xmlns:bpmndi="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.omg.org/spec/BPMN/20100524/DI" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.omg.org/spec/BPMN/20100524/DI&lt;/A&gt;&lt;SPAN&gt;" xmlns&lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://connect.hyland.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;mgdc="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.omg.org/spec/DD/20100524/DC" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.omg.org/spec/DD/20100524/DC&lt;/A&gt;&lt;SPAN&gt;" xmlns&lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://connect.hyland.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;mgdi="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.omg.org/spec/DD/20100524/DI" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.omg.org/spec/DD/20100524/DI&lt;/A&gt;&lt;SPAN&gt;" typeLanguage="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.w3.org/2001/XMLSchema&lt;/A&gt;&lt;SPAN&gt;" expressionLanguage="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.w3.org/1999/XPath" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.w3.org/1999/XPath&lt;/A&gt;&lt;SPAN&gt;" targetNamespace="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.activiti.org/processdef" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.activiti.org/processdef&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt; &amp;lt;process id="ABCD" name="ABCD" isExecutable="true"&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;lt;startEvent id="uploadStart" name="uploading"&amp;gt;&amp;lt;/startEvent&amp;gt;&lt;BR /&gt; &amp;lt;userTask id="uploadGroup" name="UploadGroup" activiti:candidateGroups="uploadGroup"&amp;gt;&lt;BR /&gt; &amp;lt;extensionElements&amp;gt;&lt;BR /&gt; &amp;lt;activiti:taskListener event="create" class="bpmManager.PdfUpload"&amp;gt;&lt;BR /&gt; &amp;lt;/activiti:taskListener&amp;gt;&lt;BR /&gt; &amp;lt;/extensionElements&amp;gt;&lt;BR /&gt; &amp;lt;/userTask&amp;gt;&lt;BR /&gt; &amp;lt;userTask id="verifyGroup" name="VerifyGroup" activiti:candidateGroups="verifyGroup"&amp;gt;&lt;BR /&gt; &amp;lt;extensionElements&amp;gt;&lt;BR /&gt; &amp;lt;activiti:taskListener event="create" class="bpmManager.VerifyPdf"&amp;gt;&lt;BR /&gt; &amp;lt;/activiti:taskListener&amp;gt;&lt;BR /&gt; &amp;lt;/extensionElements&amp;gt;&lt;BR /&gt; &amp;lt;/userTask&amp;gt;&lt;BR /&gt; &amp;lt;sequenceFlow id="assignToUploadGroup" name="AssignToUpload" sourceRef="uploadStart" targetRef="uploadGroup"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;&lt;BR /&gt; &amp;lt;sequenceFlow id="assignToVerifyGroup" name="AssignToVerifyGroup" sourceRef="uploadGroup" targetRef="verifyGroup"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;&lt;BR /&gt; &amp;lt;userTask id="managementGroup" name="ManagementGroup" activiti:candidateGroups="managementGroup"&amp;gt;&lt;BR /&gt; &amp;lt;extensionElements&amp;gt;&lt;BR /&gt; &amp;lt;activiti:taskListener event="create" class="bpmManager.VerifiedDataManager"&amp;gt;&lt;BR /&gt; &amp;lt;/activiti:taskListener&amp;gt;&lt;BR /&gt; &amp;lt;/extensionElements&amp;gt;&lt;BR /&gt; &amp;lt;/userTask&amp;gt;&lt;BR /&gt; &amp;lt;sequenceFlow id="assignToManagement" name="AssignToManagement" sourceRef="verifyGroup" targetRef="managementGroup"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;&lt;BR /&gt; &amp;lt;endEvent id="end" name="End"&amp;gt;&amp;lt;/endEvent&amp;gt;&lt;BR /&gt; &amp;lt;sequenceFlow id="goingToEnd" name="GoingToEnd" sourceRef="managementGroup" targetRef="end"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;&lt;BR /&gt; &amp;lt;/process&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/definitions&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2017 08:42:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-already-deployed-process-definition/m-p/8036#M3641</guid>
      <dc:creator>pjainiit</dc:creator>
      <dc:date>2017-08-14T08:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to get already Deployed Process Definition</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-already-deployed-process-definition/m-p/8037#M3642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok I think I had misunderstood. I thought maybe you had a service task that was reading the process definition but you don't have that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems that what you are doing is running step 2 from a separate application and&amp;nbsp;want to retrieve tasks for that same process definition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would think that you could just restrict the query by the task name instead of the process instance. See&amp;nbsp;&lt;A class="link-titled" href="https://github.com/Activiti/Activiti/blob/5.22.0-release/modules/activiti-engine/src/test/java/org/activiti/engine/test/api/task/TaskQueryTest.java#L143" title="https://github.com/Activiti/Activiti/blob/5.22.0-release/modules/activiti-engine/src/test/java/org/activiti/engine/test/api/task/TaskQueryTest.java#L143" rel="nofollow noopener noreferrer"&gt;Activiti/TaskQueryTest.java at 5.22.0-release · Activiti/Activiti · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you wanted to find a process definition you could to it by process definition name (&lt;A class="link-titled" href="https://github.com/Activiti/Activiti/blob/5.22.0-release/modules/activiti-engine/src/test/java/org/activiti/engine/test/api/repository/ProcessDefinitionQueryTest.java#L110" title="https://github.com/Activiti/Activiti/blob/5.22.0-release/modules/activiti-engine/src/test/java/org/activiti/engine/test/api/repository/ProcessDefinitionQueryTest.java#L110" rel="nofollow noopener noreferrer"&gt;Activiti/ProcessDefinitionQueryTest.java at 5.22.0-release · Activiti/Activiti · GitHub&lt;/A&gt;&amp;nbsp;) but I am not sure if you need to do that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2017 10:03:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-already-deployed-process-definition/m-p/8037#M3642</guid>
      <dc:creator>ryandawson</dc:creator>
      <dc:date>2017-08-14T10:03:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to get already Deployed Process Definition</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-already-deployed-process-definition/m-p/8038#M3643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Am I right in thinking that steps 1 and 2 are taking place in two different java applications? Presumably if you follow step 1 immediately with a taskQuery and claim the task (possibly setting authenticated user through identityService&amp;nbsp;in between to change user) then that doesn't error?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2017 10:17:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-already-deployed-process-definition/m-p/8038#M3643</guid>
      <dc:creator>ryandawson</dc:creator>
      <dc:date>2017-08-14T10:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to get already Deployed Process Definition</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-already-deployed-process-definition/m-p/8039#M3644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;Yes you are right. Step 1 and 2 are two different java applications. And it works fine if both Step 1 and 2 are executed in same application. And as you said to "&lt;SPAN style="color: #727174; background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;restrict the query by the task name instead of the process instance. &lt;/SPAN&gt;" will it help me to perform claiming the task , completing the task , get other pending task list for second user ( in another java application) which was started by first user ( of another java application).&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;My goal is to get all task list with was started by first user and then resume by second user. And it is web application,&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;So both the user are different and they having logging to account to get task list , then claim it and at last complete it.&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;Hope you got my Point. &amp;nbsp;Please help me to get its solution. As I am new to it. And not able to get the solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2017 10:44:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-already-deployed-process-definition/m-p/8039#M3644</guid>
      <dc:creator>pjainiit</dc:creator>
      <dc:date>2017-08-14T10:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to get already Deployed Process Definition</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-already-deployed-process-definition/m-p/8040#M3645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually I see that you are already doing a query that doesn't involve process instance as you have '&lt;SPAN style="color: #727174; background-color: #ffffff; border: 0px;"&gt;taskService&lt;/SPAN&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;.createTaskQuery().taskTenantId("orgId").taskCandidateGroup("SecondGroup")' But I am guessing that if you add log statement to that second application to see where it fails it probably fails before that?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;I imagine that&amp;nbsp;you have the xml file on the classpath in both applications and the second application is failing during the engine's&amp;nbsp;attempt to auto-deploy it? If so are applications 1 and 2 on different servers and are they using the same encoding? I take it there's a reason why you need to use two different applications instead of just one?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2017 11:06:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-already-deployed-process-definition/m-p/8040#M3645</guid>
      <dc:creator>ryandawson</dc:creator>
      <dc:date>2017-08-14T11:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to get already Deployed Process Definition</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-already-deployed-process-definition/m-p/8041#M3646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is It possible for you to give sometime, So that we can sit and discuss the issue by screen sharing ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know the solution is quit simple but I am not getting it.&lt;/P&gt;&lt;P&gt;Or can you share some working example ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement :&lt;/P&gt;&lt;P&gt;There are 3 groups (Let say A , B , C )and Some users (Let say "a" belong to "A" , "b" belong to "B" and "c" belong to "C") are assigned to each group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Once first user "a" logged in and start a process which is now forwarded to Group "B". And after that logged out. ( may be he started more than one task).&lt;/P&gt;&lt;P&gt;2) Now second user "b" logged in and Able to see all the task started by "a" because he belong to Group "B".&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, now first he claim the task so that it comes in his personal task list. and after that he complete it. So once he complete the task , now this task will be forwarded to Group "C". and he can now logged out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) Now any of user belong to Group "C" logged in and able to see task list completed by user "b".&amp;nbsp;&lt;/P&gt;&lt;P&gt;And similar to above step. He can first claim the task and then he complete it and in this way first process ends.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So , you can think that once a new process is started by user "a" , a new process definition will be deployed having a new processInstanceId. and when user "b" logged in he can get deployed process of previous step having same processInstanceId. and he can resume the task and so on for user "c".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you can share a sample code. It will be great.&lt;/P&gt;&lt;P&gt;Waiting for your response ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2017 10:16:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-already-deployed-process-definition/m-p/8041#M3646</guid>
      <dc:creator>pjainiit</dc:creator>
      <dc:date>2017-08-16T10:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to get already Deployed Process Definition</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-already-deployed-process-definition/m-p/8042#M3647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So presumably if a user from group a starts the task then all of the subsequent actions have to be performed by somebody from group B or C (i.e. not A). That would appear to be much like the discussion at the bottom of&amp;nbsp;&lt;A __default_attr="211454" __jive_macro_name="thread" _jive_internal="true" class="jive_macro_thread jive_macro link-titled" href="https://community.alfresco.com/thread/211454-how-to-assign-a-task-to-a-particular-user-based-on-certain-condition" rel="nofollow noopener noreferrer"&gt;&lt;/A&gt;&amp;nbsp;. In that case you could follow the suggestion there to add a service task to dynamically set a variable and have the candidateGroup for the task set based on that variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Aug 2017 16:30:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-already-deployed-process-definition/m-p/8042#M3647</guid>
      <dc:creator>ryandawson</dc:creator>
      <dc:date>2017-08-17T16:30:35Z</dc:date>
    </item>
  </channel>
</rss>

