Solved

Can I execute a task with task parameters from another task?

  • 4 March 2021
  • 4 replies
  • 78 views

I try to execute a task from another task and have it ask me for values for the task parameters. Unforunately I never get the parameter form. Is this possible?

icon

Best answer by Mark Jongeling 4 March 2021, 12:16

View original

4 replies

Userlevel 7
Badge +23

Hi Marieke,

You can link up different Tasks using a Process flow, but it is not possible to execute another Task during the execution of a Task and have it ask for parameters.

When you execute a stored procedure (Task) in SQL, it cannot ask the user for parameter values in the GUI.

By using a Process flow, you can execute another Task after the first Task is completed it's execution. You can decide if the second Task will be executed or not based on the result of the first Task. The second Task will pop-up if there are Editable or Read-only parameters.

Example:

Process flow

 

And how do I force success or failure?

Userlevel 7
Badge +23

One way is the usual way, if a Task succeeds the Green line will be followed and if the Task runs into an error, either by SQL or through using tsf_send_message with the last parameter (abort) = 1, then the Red line will be followed.

You can also make two blue lines (Always line) and decide in the Process procedure which path to follow in which situation. 

Use process procedure of Process action.

Process procedure can look like this:

Example

Here the value of a Process variable determines what Process action to continue with based on the Message option the user selected. When the user pressed the first button, open Relation, or the second button another screen. Else the Process flow ends.

Hope this helps!

Thanks

Reply