Expression for print to console log

Hi all,

May I know what is the expression used for printing log to console?
Understand that there are internal context variables context variables and also internal context functions context functions

Is there anything like for example ${print "hello world"} or ${log "hello world"}

Please help.

Hi @Brandon,

you can use scripting to print data to the console: https://docs.camunda.org/manual/7.9/user-guide/process-engine/scripting/.

You can use scriptFormat="javascript" and print "something"; in the script content to send output to the console.

Hope this helps, Ingo

2 Likes

@Ingo_Richtsmeier,
Got it. Thanks!

Hi @brandon, how to send a url(post) to a service task and it calls that rest method, then wait for response then hit another post call?

ie:
Get input → send to service task to call a rest API → wait for response → send to service task to call another rest API → wait for response → end

do you have any sample code / bpnm with javascript?

@dianesen you can set endpoint, payload, http method and other request details in the process variables. In the service task JavaDelegate you can use RestTemplate or OkHttpClient to make a rest api call.