How do you pass process variable parameter into an expression

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

Parents
  • 0
    Certified Senior Developer

    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.

Reply
  • 0
    Certified Senior Developer

    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.

Children