Big news! The community will be moving to a new platform April 21. Read more.
Big news! The community will be moving to a new platform April 21. Read more.
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor
1280 views

Condition activity in a workflow doesn´t work

Hi

I have designer v4.5.1.1. I´m doing a workflow with a condition activity that drives in the true case to other condition and in the false case to an entity activity.

The problem is that although I have verified that the first condition returns true and that the data type is boolean even so it is going the way of false.

I don´t really know why this happens. Any ideas?

Is there other way to manage this?

Thanks in advance!
Labels (1)
0 Likes
3 Replies
Absent Member.
Absent Member.

So far, I've not experienced problems with condition activities (when
used correctly).
Surely a few more details would help solving your issue.

Wolfgang

On 01.07.2016 18:06, aortizmicrofocus wrote:
>
> Hi
>
> I have designer v4.5.1.1. I�m doing a workflow with a condition activity
> that drives in the true case to other condition and in the false case to
> an entity activity.
>
> The problem is that although I have verified that the first condition
> returns true and that the data type is boolean even so it is going the
> way of false.
>
> I don�t really know why this happens. Any ideas?
>
> Is there other way to manage this?
>
> Thanks in advance!
>
>

0 Likes
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Hi

Thanks for your fast response. My first condition activity is called "CondicionTieneMiembros". I have a function in it but for testing I put this code:

function a(){
var a = "test";
if(a=="test")
return true;
else
return false;
}
a();
Packages.java.lang.System.out.println("a(): "+a());
Packages.java.lang.System.out.println("a() typeof: "+typeof(a()));

In the catalina.out I can see the following:

a(): true
a() typeof: boolean

I attach my workflow image. In the true case I expect that the workflow continues to "HayQuorum" condition but it doesn´t and takes the false way to the "Borrado" entity.



That behavior is reflected in the catalina.out too. I also attached the image from the log.



Thanks
0 Likes
Absent Member.
Absent Member.

Conditions should return a boolean. In your case it may return
undefined, because you're doing additional stuff after calling your
function a(): println returns void/undefined.

If you want to log variables, try moving the println into the functions.

function a(){
var a = "test";
var result = (a=="test");
Packages.java.lang.System.out.println(result);
Packages.java.lang.System.out.println(typeof(result));
return result;
}
a();

Wolfgang


On 01.07.2016 22:16, aortizmicrofocus wrote:
>
> Hi
>
> Thanks for your fast response. My first condition activity is called
> "CondicionTieneMiembros". I have a function in it but for testing I put
> this code:
>
> function a(){
> var a = "test";
> if(a=="test")
> return true;
> else
> return false;
> }
> a();
> Packages.java.lang.System.out.println("a(): "+a());
> Packages.java.lang.System.out.println("a() typeof: "+typeof(a()));
>
> In the catalina.out I can see the following:
>
> a(): true
> a() typeof: boolean
>
> I attach my workflow image. In the true case I expect that the workflow
> continues to "HayQuorum" condition but it doesn�t and takes the false
> way to the "Borrado" entity.
>
> 5540
>
> That behavior is reflected in the catalina.out too. I also attached the
> image from the log.
>
> 5541
>
> Thanks
>
>
> +----------------------------------------------------------------------+
> |Filename: log.jpg |
> |Download: https://forums.novell.com/attachment.php?attachmentid=5541 |
> +----------------------------------------------------------------------+
>

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.