<?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: Activiti Workflow and Project Architecture in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/activiti-workflow-and-project-architecture/m-p/156869#M111091</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The right architecture for this case is *NOT* to serialize something like a session, that's always a bad idea.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The right architecture would inject the current session into a JavaDelegate of Activiti, which is managed by a container such as Spring or CDI.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Sep 2013 08:19:56 GMT</pubDate>
    <dc:creator>jbarrez</dc:creator>
    <dc:date>2013-09-06T08:19:56Z</dc:date>
    <item>
      <title>Activiti Workflow and Project Architecture</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-workflow-and-project-architecture/m-p/156867#M111089</link>
      <description>I start to integrate Activiti in my application, and I faced architecture problems.My bussiness logic looks like:&amp;nbsp; //this handler proceed ALL logic, and call needed activiti to do the final actions&amp;nbsp; public void handle(org.eclipse.jetty.websocket.api.Session clientSession) {&amp;nbsp;&amp;nbsp;&amp;nbsp; //I. Create and Save t</description>
      <pubDate>Fri, 06 Sep 2013 07:24:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-workflow-and-project-architecture/m-p/156867#M111089</guid>
      <dc:creator>fritz128</dc:creator>
      <dc:date>2013-09-06T07:24:57Z</dc:date>
    </item>
    <item>
      <title>Re: Activiti Workflow and Project Architecture</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-workflow-and-project-architecture/m-p/156868#M111090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Maybe you can use a ThreadLocal to store the session and retrieve it from a service task. But that only works if you don't have asynchronous parts in your process.&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>Fri, 06 Sep 2013 08:16:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-workflow-and-project-architecture/m-p/156868#M111090</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2013-09-06T08:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: Activiti Workflow and Project Architecture</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-workflow-and-project-architecture/m-p/156869#M111091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The right architecture for this case is *NOT* to serialize something like a session, that's always a bad idea.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The right architecture would inject the current session into a JavaDelegate of Activiti, which is managed by a container such as Spring or CDI.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Sep 2013 08:19:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-workflow-and-project-architecture/m-p/156869#M111091</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2013-09-06T08:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: Activiti Workflow and Project Architecture</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-workflow-and-project-architecture/m-p/156870#M111092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;(and they will probably use thread local behind the scenes, as Tijs suggested)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Sep 2013 08:20:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-workflow-and-project-architecture/m-p/156870#M111092</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2013-09-06T08:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: Activiti Workflow and Project Architecture</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-workflow-and-project-architecture/m-p/156871#M111093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;First of all, thank you for reply!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I get you the more detail disclosure of my subprocess, and try to explain why Injection &amp;amp; ThreadLocal seems not appropriate in my case.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;My workflow:&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I have some global process, for example, car lottery. This process starts when manager push "Start Lottery" button. He can start many loterries simultaneously.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;To participate in this lottery user should go throught several stages of registration, attend on lottery, take a price (big or small, little price gives to all participants), and so on. So this task need to be moved to separate subprocess.&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;Workflow diagram:&lt;/STRONG&gt;&lt;BR /&gt;&lt;A href="http://postimg.org/image/ioq6jynp1/" rel="nofollow noopener noreferrer"&gt;[img=http://s2.postimg.org/ioq6jynp1/Process.jpg]&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Problems:&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't say that that are bad approaches, I only want to know if it is possible to solve the problems below&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;Why not inject:&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;1. As I understand, serviceTask creates only once for all subprocesses. If yes, it is not a good approach in my case, beacause I want to launch subprocess each time for different client (ass a result, each time for different session).&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;Why not thread local&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Thread local is a good thing. But as I understand I should intialize my ThreadLocal session in the first task of the subprocess. This means that I should retrieve session from some getSession() method. But again, what about remote machine &amp;amp; serialization?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Sep 2013 12:27:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-workflow-and-project-architecture/m-p/156871#M111093</guid>
      <dc:creator>fritz128</dc:creator>
      <dc:date>2013-09-06T12:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: Activiti Workflow and Project Architecture</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-workflow-and-project-architecture/m-p/156872#M111094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;1. In the regular Activiti way, yes. However, when integrating with a dependency container things change a bit. If you reference a bean that has a certain scope (eg session-scoped) in that container, the actual service task is not static for all processes. I didn't say that in my original post, correct, it shouln't be the session that it injected, rather the bean acting as the service task.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2. No, the session should be managed by a container and let the container manage the storage and all that. I was just saying that typically, frameworks such as Spring use thread local to do exactly that.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Sep 2013 12:14:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-workflow-and-project-architecture/m-p/156872#M111094</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2013-09-12T12:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: Activiti Workflow and Project Architecture</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-workflow-and-project-architecture/m-p/156873#M111095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi this is basically the same problem that I am facing. I want to start an activiti process and then send a message through a web socket when some event occurs in activiti ( such as end of process). I still cannot figure out how would I be able to inject the web socket sessions in a Java Delegate class or&amp;nbsp; an ExecutionListener class (such as end of process). An example would help a lot maybe using CDI.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks&amp;nbsp; &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2014 09:07:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-workflow-and-project-architecture/m-p/156873#M111095</guid>
      <dc:creator>dmifs</dc:creator>
      <dc:date>2014-03-10T09:07:53Z</dc:date>
    </item>
    <item>
      <title>Re: Activiti Workflow and Project Architecture</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-workflow-and-project-architecture/m-p/156874#M111096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Using CDI in a tasklistener is quite easy. Just inject everything you want in the TaskListener implementations. Next, configure activiti to use CDI (see userguide) and finally in your process, you reference the CDI-bean from within the task-listener, using activiti:delegateExpression="myAwsomeBean". Hope this helps…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2014 09:38:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-workflow-and-project-architecture/m-p/156874#M111096</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2014-03-10T09:38:49Z</dc:date>
    </item>
  </channel>
</rss>

