I am trying to pass the value of a process variable into my expression, and the expression is also used in the process model.
Please, see attached image:
The rule - drxxxxStoredProcedureDirDepAggregatedPaymentForDate looks like this:
executestoredprocedure( datasourceName: "jdbc/ABC", procedureName: "dbo.procCtePaent", inputs: { { name: "date_param", value: "" } }).result[1]
Discussion posts and replies are publicly visible
Hi , create a rule input in your expression rule. Once you use this expression in a process model then pass the process variable into it. For example if you have a rule called "getEmployeeDetails" and you have rule input "employeeId" in it. Then , when you call this rule in process model ,it should look like below,
rule!getEmployeeDetails (employeeId:pv!employeeId).
So in your case , create a rule input of "paymentDate" and then, once you call it in process model pass the process variable.
this expression is not returning value. But the stored proc has values.
Why are you calling your Stored Procedure rule twice just to check whether it returns an empty value?
Yes, the first checks whether it has empty value.
The second executes if the value is not empty.
Is it being called on a different date in the two different spots? I couldn't tell as your original screenshots cuts off what value is actually passed in.
it's calling the same date. This issue is now resolved. I noticed that the previous expression calling the stored proc needed the fv!items.xxxx to match the xxxx in the current expression. It was a case sensitivity issue. caseid != caseId.
I'm glad to hear you got the surrounding syntax issues worked out. Though I was getting at something else with my comment here.
I guess my point here was that if you're calling the same stored procedure in the same way twice, just to check whether it returns empty, then what you should be doing is calling it just once, setting that value into a local variable, and then check that variable to see if it's empty. There's no reason to call it twice when you only need to call it once.
Please, can you show me a sample of how to do that?
Thanks
docs.appian.com/.../Local_Variables.html