This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Operation canceled when I define an attribute StateAction

Former Member
Former Member
Hi,

When I define the function following in the VaultApplication class, M-Files cancel the state action.
In debug, I don't reach the line of code.
Do you have a sample code to use the attributes please.

    [StateAction("XONYX_QM_ST_APPLICABLE")]
    public void WorkflowStateAction(StateEnvironment env) {
      xQMT.finalDocUpdateVersion(env.Vault, env.ObjVer);
    }

Thanks
Parents
  • There are attribute examples on the developer portal: developer.m-files.com/.../

    When you say "M-Files cancel the state action", do you mean you get some error message or that the action just doesn't run? Are there some errors in the Windows event log?

    To troubleshoot, you should first open your workflow state in M-Files Admin and see that there is some script in the state action (Action tab > Run script > Edit...). This script is added automatically when you install your vault application. If there is no script there, then the state action hasn't been registered properly. Check that the state alias is correct in your code and try uninstalling and reinstalling the vault application.
Reply
  • There are attribute examples on the developer portal: developer.m-files.com/.../

    When you say "M-Files cancel the state action", do you mean you get some error message or that the action just doesn't run? Are there some errors in the Windows event log?

    To troubleshoot, you should first open your workflow state in M-Files Admin and see that there is some script in the state action (Action tab > Run script > Edit...). This script is added automatically when you install your vault application. If there is no script there, then the state action hasn't been registered properly. Check that the state alias is correct in your code and try uninstalling and reinstalling the vault application.
Children
No Data