Script Task Vs User Input Task

difference between script task and user input task? And why we use? And when we use?

  Discussion posts and replies are publicly visible

Parents Reply Children
  • As per the documentation generally only node outputs are configured for script task and not node input ?

  • Basically the node input name is a activity class parameter confined to a node and the node output will provide us to map dynamic expression onto process variables ?

  • 0
    Certified Senior Developer
    in reply to MANASA V

    You can create node input as well as node output. 

  • Yup, it's a little confusing when you first start. So, you use the node Inputs to define a variable that is local to the node i.e. an Activity Class variable. You can set this value to the value of a process variable (which is in effect passing by value - i.e. a copy of the value in the process variable). Or you can set the value using an expression (e.g. you could call a rule and have that rule do anything you want). Now that you have a value in your Activity Class variable you could just pass it out again to the same (or a different ) process variable, using the 'Save into' setting. In effect, you can get data into and out of your script task without ever leaving the Inputs tab.

    You also have the option of conducting what you might think of as "post processing" on the value of your activity class variable, which you can do in the Outputs tab. You can reference the Activity Class variables in the Outputs tab and do whatever you want before writing the value back to a process variable.

    Or you do not have to use any Inputs if they're not required for the step you're configuring. You could just run a rule in the Outputs tab and write the output to a process variable.

  • 0
    Certified Lead Developer
    in reply to MANASA V
    What is the difference in node inputs and outputs ? I am unable to figure out

    As an aside, writing expression code in a node input is STILL a painful process for anything other than simple, single-line expressions, because for SOME reason they still haven't updated some of the legacy expressionable fields to not collapse everything to a single row upon saving.  GRUMBLE.

    Therefore, even to my direct disadvantage at times, I avoid using input fields at all costs (though of course some are unavoidable).  I eagerly await them fixing this unreasonable legacy constraint in the various places it still exists.