Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Using xpath-expressions inside Task Instructions

Avatar

Level 8
Level 8

Hi all,

I have a process where I would like to build up the task Instructions in a string variable. However I cannot seem to resolve xpath values when I am putting my string as the task instruction.

How can I do this?

Thanks in advance

Sincerely

Kim Christensen

1 Accepted Solution

Avatar

Correct answer by
Level 10

What Marcel is saying is that it's easier to user the 'Template' option instead of a variable since you can type your text like a normal sentence with xPath expression embededd into it.

If you use a setValue and set a string, you need to concatenate the strings together using an expression like concat('Here are some instructions for',/process_data/myOtherVar, 'please follow them.').

Jasmin

View solution in original post

6 Replies

Avatar

Employee

Kim,

You should be able to use the following notation:

Here are some instructions for {$/process_data/myvariable$}, please follow them.

Marcel

Avatar

Level 8
Level 8

Hi again Marcel - thanks for your quick reply

However I am not sure I und erstand your answer correctly.

I have a string variable (str_Inctructions) that I want to set as my Task Instruction.

So at a point in my process I create a set value with an expression like this:

str_Instructions = 'Here are some instructions for {$/process_data/myOtherVar$} please follow them.'

I then set str_Instructions as the Task Instructions (an xpath-expression). When I get the Task in Workspace I see the {$/process_data/myOthervariable$} instead of the value of myOtherVar.

So how can I get the value of myOtherVar?

Avatar

Level 2

Hi,

Please make sure that you have selected the task instruction type from literal to variable. It is a drop down on the right hand side.

Regards,

Waqas

Avatar

Level 2

Hi,

Please make sure that you have selected the task instruction type from literal to variable. It is a drop down on the right hand side.

And you can use the concatenation function in your setValue

str_Instructions = concat('Here are some instructions for ',/process_data/myOtherVar, 'please follow them.')

Or place the

'Here are some instructions for {$/process_data/myOtherVar$} please follow them.' in the task instruction and mark the instruction type as template.

Regards,

Waqas

Avatar

Correct answer by
Level 10

What Marcel is saying is that it's easier to user the 'Template' option instead of a variable since you can type your text like a normal sentence with xPath expression embededd into it.

If you use a setValue and set a string, you need to concatenate the strings together using an expression like concat('Here are some instructions for',/process_data/myOtherVar, 'please follow them.').

Jasmin

Avatar

Level 8
Level 8

Hi again all,

This works fine - I was just not aware that I needed top use the concat function to do gain this functionality.

Thanks a lot

Sincerely

Kim Christensen