Search code examples
webcenteroracle-ucm

UCM Idoc scripting Cannot find the parameter 'wfAction'. error


im trying to detect the workflow action outcome so i can make a custom logic and this is the code

<$if wfAction like "APPROVE"$>
    <$wfSet("wfJumpName", "returntoOriginal")$>
    <$wfSet("wfJumpTargetStep", "reveew@newWorkFlow")$>
    <$wfSet("wfJumpReturnStep", wfCurrentStep(0))$>
    <$wfSet("wfJumpEntryNotifyOff", "0")$>
    <$wfReleaseDocument()$>
<$endif$>

this code is generated , i didn't write any line but when i try to test the script i get the following error :

Cannot find the parameter 'wfAction'.

Solution

  • Are you testing that code in the context of a workflow approval/rejection? That is the only time that wfAction would be present. You can see what is in the context by adding this code before the if statement.

    <$trace("#all", "#console")$>

    This will dump all local variables, result sets, and environment variables to the system console. More information on the trace() function can be found in the Oracle documentation.