<?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 Best practices for designing business process in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/best-practices-for-designing-business-process/m-p/209138#M162268</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello folks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I am new to Activiti and I have installed v5.18. I have some specific question around how to accomplish certain things in Activiti.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Is it a best practice to declare Spring beans and use them as global variables to pass around in the context of a process?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. How do I gain visibility into what gets passed around (like for e.g. auditing trail) for an object from the explorer? This is valuable for supporting the processes from a production standpoint. Do I need to convert objects to xml model and make them available from the explorer to accomplish this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Once an instance in completed, there is no visibility into the variables. Is that something that can be turned on/off?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4. For making an integration using REST, SOAP, JMS etc, the java delegate service task must be used I guess. With every integration comes the transformation effort to map to target format the request/response.&amp;nbsp; How is this accomplished? Is java XSLT api approach preferred over java binding approach?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;5. What is the standard practice to pass data from parent BP to a standalone BP? Like lots of data. It is cumbersome to declare input/output parameters for all data that needs to be passed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;6. How do I handle faults in a more generic manner at engine level (not the process-centric error handling) i.e. can i catch the faults at engine level and then bubble to a process instance which raised it in the first place?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;7.&amp;nbsp; How do I externalize artifacts that might be environment specific? For e.g. xsd, external wsdl etc. I guess you can always serve them up as http resource from a directory. Is there a better approach? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;8. We have huge investment in XML based workflow (Oracle Fusion) and have lots of wsdls, xsds, XSLTs etc.&amp;nbsp; How best can we leverage that with Activiti which seems to be very java-centric?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Like I said, I am new, so please forgive me if I misstated anything.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Keep up the good work…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks much&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Clint&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 29 Aug 2015 14:11:22 GMT</pubDate>
    <dc:creator>soaguy</dc:creator>
    <dc:date>2015-08-29T14:11:22Z</dc:date>
    <item>
      <title>Best practices for designing business process</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/best-practices-for-designing-business-process/m-p/209138#M162268</link>
      <description>Hello folks,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I am new to Activiti and I have installed v5.18. I have some specific question around how to accomplish certain things in Activiti.1. Is it a best practice to declare Spring beans and use them as global variables to pass around in the context of a process?2. How do I gain</description>
      <pubDate>Sat, 29 Aug 2015 14:11:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/best-practices-for-designing-business-process/m-p/209138#M162268</guid>
      <dc:creator>soaguy</dc:creator>
      <dc:date>2015-08-29T14:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: Best practices for designing business process</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/best-practices-for-designing-business-process/m-p/209139#M162269</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;I´ve been using Activiti for about three year now in a couple of systems that now have around 20 processes. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The answers I´ll give below are solely my thoughts based on that experience, so you should _not_ take them &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;as anywhere close as a "best practice".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Is it a best practice to declare Spring beans and use them as global variables to pass around in the context of a process?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would try to avoid that. Each bean you use creates a runtime dependency and this can quickly create maintanainbility problems&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;as you process definitions are updated. In my case, I´ve settled for a just a very small number of spring beans that&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;are not process-specific and are used only for &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2. How do I gain visibility into what gets passed around (like for e.g. auditing trail) for an object from the explorer? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This is valuable for supporting the processes from a production standpoint. Do I need to convert objects to xml model &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and make them available from the explorer to accomplish this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;While you don´t _need_ to do this, I would strongly recommend that you use XML or JSON as the stanrdard serialization&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;method for complex datatypes. Activiti provides extension points that make this conversion transparent to process-level&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;code. Check the javadocs on custom form types and custom variable types for more information on that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Once an instance in completed, there is no visibility into the variables. Is that something that can be turned on/off?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is not correct. If you use default settings, the final values for process variables are available for&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;querying through the java and REST apis. If you change the audit level for the engine, you´ll also be able to query&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for all variable value changes too. Please check the javadocs for the HistoricVariableInstanceQuery interface for more&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;details on this topic.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;4. For making an integration using REST, SOAP, JMS etc, the java delegate service task must be used I guess. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;With every integration comes the transformation effort to map to target format the request/response. How is this accomplished? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is java XSLT api approach preferred over java binding approach?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In my case, I´ve settled for the given practice:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. All integration tasks are modeled by "system tasks"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. All system tasks use an "activiti expression" that invokes a helper spring bean which, in turn, delegates the execution&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; to a Groovy script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Since the second step is always the same, I´m looking forward to simplify this by adding the appropriate invocation logic&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;at deploy time and adoptiong a convention-over-configuration approach (eg: a system task called "LookpCustomerData" would automatically&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;call a Groovy script called LookpCustomerData.groovy)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As for the mapping effort, I´ve also stablished that all integrations must go through an ESB (WSO2´s ESB in my case), which is in charge&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for all data conversion tasks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;5. What is the standard practice to pass data from parent BP to a standalone BP? Like lots of data. It is cumbersome to declare &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;input/output parameters for all data that needs to be passed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can pass complex structures as input/output parameters, which make calling subprocesses less cumbersome. If you use JSON and/or&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;XML data types this becomes quite easy to do but you must take into account that you may run into versioning issues. Eg, you may have&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;a "customer" variable that is a complex datatype (meaning one with many fields and collections). If at some point you decide to add new&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fields to this structure, then the receiving process must be able to handle this. The problem is that you may have to support both&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;versions, since older process instances have an associated customer instance that was created before your change.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;6. How do I handle faults in a more generic manner at engine level (not the process-centric error handling) i.e. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; can i catch the faults at engine level and then bubble to a process instance which raised it in the first place?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In Activiti there are two types of faults:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;a) Exceptions that inherit from BpmnError: those are handled as process exceptions and receive an special handling see Activiti´s guide for a detailed explanation).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;b) Other exceptions (eg: runtime errors due to a backend service that is unavailable): Those will bubble up to the caller or will end up as a "failed job", depending on the way you´ve set the "asynchronous" flag on BPMN elements that are part of the particular trail of activities that preceded the point where the exception was thrown.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In general, what I´ve been doing is to define all system tasks as "asynchronous" so, in the event of an error, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I can retry the failed activity later. In order to to that, I use the ManagementService interface which allow you to query for failed&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;jobs and resubmit them.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;7. How do I externalize artifacts that might be environment specific? For e.g. xsd, external wsdl etc. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; I guess you can always serve them up as http resource from a directory. Is there a better approach? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Not much to say here. In my case I only use this kind of artifact in the ESB, which provided its own repository. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;8. We have huge investment in XML based workflow (Oracle Fusion) and have lots of wsdls, xsds, XSLTs etc. How best can we leverage &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;that with Activiti which seems to be very java-centric?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think you can reuse much of those artifacts, as long as they´re related to services consumed my a given workflow. Activiti supports&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;calling web-services (see Web Service Task), but tooling support for that is weak. Im my case, I´ve found that doing the required calls&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;in Groovy is quite simple, so I´m sticking with that approach for now.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Aug 2015 18:59:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/best-practices-for-designing-business-process/m-p/209139#M162269</guid>
      <dc:creator>pmsevestre</dc:creator>
      <dc:date>2015-08-30T18:59:49Z</dc:date>
    </item>
  </channel>
</rss>

