cancel
Showing results for 
Search instead for 
Did you mean: 

Can we have if condition in <documentation> tag

thiagarajan
Champ in-the-making
Champ in-the-making
1. I have page called submit issue page where user can submit issues. If the issue priority is low or medium, then it will go to one level of approval. If the issue priority is high or elevated it needs two level of approval.

In submit issue screen i have the following documentation.

Approver 1 Comments: ${approver1Comments}
Approver 2 Comments: ${approver2Comments}

It is displayed as it is for the first time. approver1Comments will have value only in second screen and approver2Comments will have values only in third screen.

if approver1 rejects the request with a comment "Change the issue priority and resubmit" then the control goes to submit screen once again where i see the approver1 comments properly.

How to prevent if from displaying for the first time. I tried few if conditions but none of them worked.

if (${approver1Comments} != null)
{
Approver 1 Comments: ${approver1Comments}
}

if (${approver2Comments} != null)
{
Approver 2 Comments: ${approver2Comments}
}

Your help is highly appreciated.

2. How to have line breaks in <Documentation>. It tried /n and </br> but none of them worked.
3 REPLIES 3

hari
Star Contributor
Star Contributor
Hi,
I guess you are trying this in activiti-explorer. For this kind of requirements, you are supposed to use other UI frameworks. As far as I explored, I did not find a way by which we can hide the fields based on some condition (hiding them if it does not have any value).

thiagarajan
Champ in-the-making
Champ in-the-making
Yeah, I tried it in activiti-explorer.  How about line breaks in documentation tag. I am getting everything in single line.

hari
Star Contributor
Star Contributor
If your BPM is a sample one, please share the code so that I can have a look at it.
I never got all of them in a single line. It was always in multiple lines. Also mention which version of activiti you are using.