Forum Discussion

jesvam's avatar
jesvam
New Contributor III
2 years ago

Manipulate or create workflow profile in BR

Hi,

Is there any way to manipulate a workflow profile or create a new one using a business rule? 

If not, any way to extract / load xml in a BR? 

Can't find anything that would help me while browsing the api.

  • I'm sorry, I have to correct myself. There currently isn't a public supported API to modify a workflow beyond changing the assigned entities. I guess the potential for screwing up is just too high.

    This said, if you peruse some marketplace solutions, you'll find that there is a way; but it's completely unsupported.

  • JackLacava's avatar
    JackLacava
    Honored Contributor

    Start from BRApi.Workflow.Metadata.GetProfile(si, profileName) and manipulate the resulting object.

    • jesvam's avatar
      jesvam
      New Contributor III

      Hi Jack and thanks for your reply! Sorry for my late response.

      I see that the property descriptions for a workflow info says "Gets or Sets the profile name", so that sounds promising.

      However just doing that doesn't update anything. I was assuming there would be something like the writeableMember object or the SaveMemberInfo method but for workflows, but I really can't find anything in the api. 

      If you could shed some light on what I'm missing I would greatly appreciate that. Basically what I want to achieve is something like this: 

       

      WorkflowProfileInfo wfTemplate = BRApi.Workflow.Metadata.GetProfile(si, "test");
      wfTemplate.Name = "blabla";
      WorkflowProfileInfo generatedWf = new WorkflowProfileInfo(wfTemplate); 
      return null; 
      • JackLacava's avatar
        JackLacava
        Honored Contributor

        I'm sorry, I have to correct myself. There currently isn't a public supported API to modify a workflow beyond changing the assigned entities. I guess the potential for screwing up is just too high.

        This said, if you peruse some marketplace solutions, you'll find that there is a way; but it's completely unsupported.