Why Script Task does have Forms Tab?

Does anyone have any idea why Script Task have Forms tab?

  Discussion posts and replies are publicly visible

  • If you check Appian uses same form for all the smart services. They dont have any specific value as such
  • Hi ,

    Good question. :) But really do not know. If you will provide and user assignment to any of the Smart service or script task it will appear in your task list but there is no use.
    It would be good if you can raise/ask this to Appian only.

    Thanks,
    Sandeep
  • Hi Shubham,
    It is clearly mentioned in the documentation that a script task cannot be assigned to a user or a group neither can a task form be configured thats the reason if you check the Assignment tab of a Script task the option for "This node will be assigned as a task to a person or a group of people" is disabled.
    The question for why it is still there is because Appian uses the same template for an Activity which is BPMN compliant.
    Thanks
  • They are using the same template for Each Node I think. That why we use to see majority of the Tabs common like Genera, Data, Forms, Scheduling, Assignment, Exceptions and other
  • The Public Java docs will give you a hint why this is so.

    All nodes in Appian have a generic base class.
    The different nodes derive/implement the interface.
    So think of Node as a base class/abstract class/interface.

    And then you have implementations of it: Start Node, End Node, SubProcess Node, Script Task Node, User Input Task Node, Write to DataStore smart service node, Custom Smart service node.
    These are the different types of nodes which are possible (I may have missed some). Each of these are different implementations of the same basic interface.


    Now - some implementations have a trait called "Attended" or "Un-Attended".

    Common understanding says that only User Input Tasks have forms.
    But that is not true.

    The following nodes also have forms:
    1. Start Process form(yes, you can create start form for them, there is a reason why this is allowed. Many portal applications had this feature, you will find some examples in very old code bases.),
    2. Smart Service (yes, you can have a form for them, there is a reason why this is allowed. Smart service input in this case can be taken from a form and fed to the smart service - avoiding need for another user input task)
    3. Write to Database smart service node. (there is a reason why this is allowed. You can directly map the form inputs to the CDT and write it in the output. This is a less common way to use this node.)
    4. SubProcess Node.
     
    All the above node have the "Attended" trait.

    If Attended trait is present - the Forms tab will be configurable.
    If Attended trait is not present - the Forms tab will not be configurable.

    One would ask - then based on the trait - Appian should have simply made the form tab hidden for the Script Task Node.
    Why did they just keep it and make it non-configurable?

    Reason:
    It is the old class hierarchies of the legacy code - which can although be reafactored - offers no significant benefit in this case.

    The script task, the smart service node and the write to database smart service node have the same base class. (I have not checked the class hierarchy in detail recently - but this is my logical guess.)
    And the base class/interface for these has the "Forms" tab defined.

    But, script task is the only one which is the odd one out - because unlike smart service and write to database smart service - it does not have the "Attended" trait.

    Hence it has the forms tab but it is not configurable.

    This is the only Java OOP explanation possible.

  • A group of tasks follows their group default layouts. Anyway the tabs are disabled when not applicable for that task. I guess Appian will be working on taking them of,f when not needed, in coming updates.
    Yeswanth.