Solved

Modify a process variable in process flows

  • 21 October 2020
  • 4 replies
  • 80 views

Userlevel 1
Badge

There is a http request in my workflow. But before sending the http request, I want to compose a process variable with a json format.
I tried this with tasks and functionality, but it's not working. (I checked this in the process flow monitor).

Is there a way to modify a process variable in the process flow, so I can use it further in the process flow?

icon

Best answer by Mark Jongeling 21 October 2020, 11:05

View original

This topic has been closed for comments

4 replies

Userlevel 7
Badge +23

Hi Corne,

Yes, it is possible. To alter a process variable you need to use a Process Procedure on a previous process flow step. (Process procedures are always activates after executing a process action.)

You can enable 'Use process procedure’ here:
 

SF: Process Flows → Process actions

This will enable you to create a Control procedure with codegroup 'PROCESSES’ and assign it to the process action. Be sure to [Generate code group] to see the Program Object.

After task you will see this

In the template you will be able to alter Process variables to your liking:

Also be sure to set the variable for Follow-up process actions. Otherwise the process flow might go different paths than you intent. For example:

if @string is not null
begin
set @execute_task_start_connection_http_connector = 1
end

This way, if your variable is filled, the http connector will the following action.

Hope this helps you out! If you have any questions, let me know.

Kind regards,
Mark Jongeling

Userlevel 1
Badge

Thanks for your quick response!

 

I get this error by adding the this code:

 set @execute_task_start_connection_http_connector = 1

 

 

Userlevel 7
Badge +23

Hey Corne,

My code was an example based on my test and will not function in your situation. The variable I set is this one:
 

 

To​​​ make it work for you, you should set this variable:

@execute_task_test_json_http_connector


So that would mean the code should look a bit like this in your case:

if @json_input is not null
begin
set @execute_task_test_json_http_connector = 1
end

 

Kind regards,
Mark Jongeling

Userlevel 1
Badge

That was stupid of me :) Thanks!