Is there a way to avoid activity chaining?

Certified Associate Developer

Hello,

I created an application where the number of nodes existing between 2 user interface form has more than 50 activity chaining associated, Due to which its getting break and the user is not able to see the second form instead from their Task tab. I know it should not exceed more than 50 but i don't have any control over it as it include couple of subprocesse as well. Is there a way to get rid of this problem? Thanks in advance

  Discussion posts and replies are publicly visible

  • Hi Vivek -

    The first thing to look at is, for process flow sequences in which two or more script tasks follow in succession, did the designer use both the inputs and outputs tabs in each of those script tasks?
    Often, a designer will create a script task to calculate or query "predicate" data for use in a dependent expression in a 2nd script task. This is sometimes very easy for designers to "wrap their heads around." However, it's not always the most efficient design.
    Instead of passing data from one node to another in a PV, pass data from the inputs tab to the outputs tab using an ACP.
    Also, you can run several expressions on inputs and outputs.
    Remember, when you're tuning, that the inputs tab always evaluates before the outputs tab, but, there's no guaranteed order of expression evaluation within each tab.

    Next, review the operations that are taking place in these nodes and consider how many you could logically calculate in your SAIL forms. It's possible that you can inexpensively calculate some expressions using the saveInto on the submit of the first form, and/or the load of the 2nd form.
  • Hi Vivek,

    1- try to decrease the script task node in the process model. For this you can merger many task script node work into one script task node. Here use input and output of Data in script task node for merging multiple script task node into one script task node.

    2- if possible try some of rule or logics to get data within your form instead of getting this in process model, it will also help you to reduce the number of nodes in process model.

    3- try to optimize the rules which are taking long time to execute by implementing best practices etc.

    4- if still your problem persist, then put one interface after some node with Next button only.

    Kindly let me know weather it help you to achieve your goal.

    Regards
    Abhay
  • Hi Vivek,

    You can consider moving the procedural logic, implemented over few nodes, in an expression rule. This can help eliminating few nodes ultimately reducing the activity chaining.
    But the suggestions given by @Rob and @Abhay takes priority.
  • Hi Vivek,
    Following steps can be taken to optimize the process

    1.If possible try some of the rule or logics to get data within your form instead of getting this in process model, try using a!save() on button press.
    2.Pass data from the input tab to the output tab of script task using ac variable.

  • Can any of those subprocesses be made asynchronous without creating a race condition? If they don't actually need to complete before the next user-task make them asynchronous.
  • Hi Vivek,

    Couple of option you can try :

    1. Merging multiple script tasks operations by using input and output tabs. Getting the data in input and using ac variables to update the process variables in output
    2. Creation of custom expression rules so as to perform multiple operations like getting the data from db, modifying data etc and return the final result.
    3. As suggested by rommels, try to fetch data in form itself rather then using script tasks.
    4. Not sure what exactly you are doing , but if you are getting data from multiple tables and performing operations over them, you can go for a database view and get only relevant data with desired operation
  • Hi viveku0001,

    You can try multiple things to make the chaining works.

    - Try to remove multiple script task (Try to manipulate the data in one script task using input or output of script task ).

    - Try to create expression rule for manipulating the data which you are doing in multiple script task and use this expression rule in one script task.

    - if you do not need any output from sub-process then you can use the sub process as Asynchronous.

    - If any of the data which you are manipulating and not using in second user input task, You can split them by using AND node and only do chaining on the path of user input task.

    If you will follow these steps then definitely you can achieve the goal.

    Hope this will help you

    Thanks