Home      Members   Calendar   Who's On

Welcome Guest ( Login | Register )
      

Home » Skelta BPM.NET 2006 » Skelta BPM.NET 2006 » Application Development » Comparing two variables for decision.


Comparing two variables for decision.Expand / Collapse
Author
Message
Posted Wednesday, July 14, 2010
Senior Member

Senior MemberSenior MemberSenior MemberSenior MemberSenior MemberSenior MemberSenior MemberSenior Member

Group: Forum Members
Last Login: Wednesday, July 14, 2010
Posts: 7, Visits: 19
Hi! I need a little help with this one.

Problem is trying to make decision by comparing two variables. What I am trying to do is have decision action make a choice by determining if x > (y * .2). The problem is the decision will only accept one variable and one static value.

How, in expression editor, can I accomplish this?

J Brown
Post #1990
Posted Wednesday, September 08, 2010
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: Thursday, January 12, 2012
Posts: 93, Visits: 121
Just a thought.   You can use script activity (sample scirpt code below) prior to decision to do the required calculations and then compare the variables in Decision to route the flow in a normal way.

//Sample CSharp code
using System;
using Workflow.NET;
using Workflow.NET.Engine;

public class WorkflowScriptab299d9182514ba78f28378411e71ed6
{
public string Run(int ExecutionId, int ExecutionDetailsId, Workflow.NET.Engine.Context ctx, Action action, string inlink)
{
int i=(int) ctx.Variables["y"].Value;
ctx.Variables["y"].Value= i * 0.2;
ctx.SaveVariables();
return "";
}
}

Cheers, Sri

Post #2058
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
-
Active Users: 1 (1 guest, 0 members, 0 anonymous members)
No members currently viewing this topic.

All times are GMT -5:00, Time now is 3:42am

 
Execution: 0.063.10 queries.Compression Enabled.

Copyright © 2002 - 2009 Skelta Software. All rights reserved. Tel: 1 (678) 306 4110 | Email:sales@skelta.com
Skelta - A BPM Workflow Software Company