<?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 Passing data from JBPMSpringActionHandler to workflowService in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/passing-data-from-jbpmspringactionhandler-to-workflowservice/m-p/190676#M143806</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a scenario where I want an action to execute when leaving a workflow state. The action is generating some data that is needed later on in the workflow. Now I would like to store this data in the workflow. The action is implementing JBPMSpringActionHandler and followingly have access to the ExecutionContext where I could access just about everything in the workflow. For example I could assign my data to a variable using executionContext.setVarieble("data", "123");&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now, later on in the workflow I have a bean that is manipulating the workflow. It uses the WorkflowService for that. But how could I read the variable set in the ExecutionContext using the workflow service? When browsing the workflow service api I can only find methods to access the workflow context or package that are nodes in the repo, not an arbitrary workflow variable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My solution so far has been to use an external bean to store the data in (associating it with a particular workflow). However I imagine this service is somehow available by the workflow service itself.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Carl&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 02 Nov 2008 21:28:22 GMT</pubDate>
    <dc:creator>calle</dc:creator>
    <dc:date>2008-11-02T21:28:22Z</dc:date>
    <item>
      <title>Passing data from JBPMSpringActionHandler to workflowService</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/passing-data-from-jbpmspringactionhandler-to-workflowservice/m-p/190676#M143806</link>
      <description>I have a scenario where I want an action to execute when leaving a workflow state. The action is generating some data that is needed later on in the workflow. Now I would like to store this data in the workflow. The action is implementing JBPMSpringActionHandler and followingly have access to the Ex</description>
      <pubDate>Sun, 02 Nov 2008 21:28:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/passing-data-from-jbpmspringactionhandler-to-workflowservice/m-p/190676#M143806</guid>
      <dc:creator>calle</dc:creator>
      <dc:date>2008-11-02T21:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: Passing data from JBPMSpringActionHandler to workflowService</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/passing-data-from-jbpmspringactionhandler-to-workflowservice/m-p/190677#M143807</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;For any variable set in workflow say:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="wcmwf:lalit"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;…..&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var dummy = executionContext.processInstance.getId();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;executionContext.setVariable("dummy", dummy);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;…..&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/process-definition&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In your action handler ,lets say for me its StatusAction , you can access teh same variable lke this :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;public class StatusAction extends ActionHandler{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;….&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;public void execute(ExecutionContext executionContext) throws Exception {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;….&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ContextInstance ctx = executionContext.getContextInstance();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Object tid = ctx.getVariable("dummy");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;…..&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try this, I hope it will help. &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2009 08:14:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/passing-data-from-jbpmspringactionhandler-to-workflowservice/m-p/190677#M143807</guid>
      <dc:creator>dynamolalit</dc:creator>
      <dc:date>2009-12-07T08:14:21Z</dc:date>
    </item>
  </channel>
</rss>

