Forum Discussion

LovaRamisetti's avatar
LovaRamisetti
New Contributor
2 years ago

Unable to execute Business rule from PowerShell/REST API

Hi All, We are facing an error "Unable to execute Business Rule 'BusinessRuleName'. Select a valid workflow, scenario and year, when executing step from PowerShell/REST API. We are passing the parameters using the option "CustomSubstVarsAsCommaSeparatedPairs". Please help if the execute step and the execute sequence works for business rules with parameters using Data Management api from PowerShell. Please help me with sample code.
Thanks & Regards,
Lova Ramisetti.

  • NicolasArgente's avatar
    NicolasArgente
    Valued Contributor

    Hi!
    Did you have a look at the Rest API Documentation Guide?  I attached the guide. You will find many examples in there. (from page 11).
    Have you tested to run it from Postman? That could make it easier to troubleshoot.

    To run a STEP add this in the Body: 
    {
    	"BaseWebServerUrl": "{{baseWebURL}}",
    	"ApplicationName": "{{appName}}",
    	"DataManagementGroupName": "Automation",
    	"StepName": "53_Export_Report",
    	"CustomSubstVarsAsCommaSeparatedPairs": ""
    }
    
    To run a SEQUENCE add this in the Body: 
    {
        "BaseWebServerUrl": "{{baseWebURL}}",
        "ApplicationName": "{{appName}}",
        "SequenceName": "ConsolidateActual",
        "CustomSubstVarsAsCommaSeparatedPairs": ""
    }

    "CustomSubstVarsAsCommaSeparatedPairs": [comma separated list of key value pairs as
    substitution variables with the following format: "VariableName1=[VariableValue1],VariableName2=
    [VariableValue2],..."] - Optional
    }

    Thanks