Is there any way to pass results of JSON response in more than one workflow variables? In the Plugin Configuration we see only 1 workflow to be mapped. Please advise.

Thanks.

  • No labels

5 Comments

  1. Ya, there's only 1 workflow variable to be mapped.

    However, if the JSON output contains more than 1 data, you may also try using BeanShell Plugin to split the output into individual data item based on delimiter, by using the StringTokenizer class

    1. Thanks.

      I am succesful to split the output. But still have difficulties to map into workflow variables. I could only map to 1 variable. Any hint behind?

      1. In the BeanShell script, you can set value to a workflow variable by using the sample codes shown here.

        1. Hi,

          I am beging with joget. I use the joget V3 . When i fill my joget form from Bean Shell Form. I have this error :

          ATTENTION: Error executing script
          Sourced file: inline evaluation of: ``import java.util.*; import org.joget.workf
          low.model.service.*;  Collection list  . . . '' : Typed variable declaration : A
          ttempt to resolve method: getBean() on undefined variable or class name: pluginM
          anager : at Line: 5 : in file: inline evaluation of: ``import java.util.*; impor
          t org.joget.workflow.model.service.*;  Collection list  . . . '' : pluginManager
           .getBean ( "workflowManager" )

                  at bsh.UtilEvalError.toEvalError(Unknown Source)
                  at bsh.UtilEvalError.toEvalError(Unknown Source)
                  at bsh.BSHMethodInvocation.eval(Unknown Source)
                  at bsh.BSHPrimaryExpression.eval(Unknown Source)
                  at bsh.BSHPrimaryExpression.eval(Unknown Source)
                  at bsh.BSHCastExpression.eval(Unknown Source)
                  at bsh.BSHVariableDeclarator.eval(Unknown Source)
                  at bsh.BSHTypedVariableDeclaration.eval(Unknown Source)
                  at bsh.Interpreter.eval(Unknown Source)
                  at bsh.Interpreter.eval(Unknown Source)
                  at bsh.Interpreter.eval(Unknown Source)
                  at org.joget.apps.form.lib.BeanShellFormBinder.executeScript(BeanShellFo
          rmBinder.java:73)

          How to get pluginManager in my script ?

          Thank's

  2. How to recognize when the JSON Plugin returns errors or no value? Errors could be connection error, JSON URL no longer valid or error on the returned value.

    Thanks.