none
Tell me why....a tale of workflow function replacestring woes RRS feed

  • Question

  • Scenario:  Custom attribute created in the portal which houses string data.

    I want to kick off a workflow that says if Attribute A has data, then replace customattrib B with data from Attribute C which would only exist if user has data in Attrib A.

    Easy right?  Create the set of users with attrib A having data - DONE

    Create workflow with activity using function replacestring attribstring - customattrib B old value customattrib B newvalue attribute C

    Create MPR to trigger said workflow based on set transition from above....easy.

    Except.....everything works, no errors, no problems as long as customattrib B ALREADY had data in it....ANY data....if it is null or blank then in search requests I can see all the system event requests targeting each user, but no modifies....

    WHY does customattrib B have to have some data inside it already for the replacestring function to work?

    flowing a constant instead of replacestring works.....so my workaround was to flow a constant BS value, then do the replacestring.

    Terrible....WHY?

    Tuesday, February 5, 2013 2:28 PM

Answers

  • I'm not sure that there is an official explanation for this. There are a lot of scenarios where the built-in functions wont cut it and that is why there is the option to write custom workflows.

    With regards to installing the workflows from my library, there should be PowerShell scripts included that'll assist you. All you need is an MPR to allow for the user running the installation script to create Activity Information Objects in the FIM Service/Portal.

    Regards, Soren Granfeldt
    blog is at http://blog.goverco.com | twitter at https://twitter.com/#!/MrGranfeldt

    Monday, February 11, 2013 7:30 AM
  • Dont know if this is off-target - but have a look at my custom activities; they may be able to simplify your task

    http://fimactivitylibrary.codeplex.com/documentation


    Regards, Soren Granfeldt
    blog is at http://blog.goverco.com | twitter at https://twitter.com/#!/MrGranfeldt

    Tuesday, February 5, 2013 3:32 PM

All replies

  • Just for clarity...this isn't meant to be used continually.  It was just a one time workflow to modify the empty attribute and then it would be disabled.
    Tuesday, February 5, 2013 2:51 PM
  • Dont know if this is off-target - but have a look at my custom activities; they may be able to simplify your task

    http://fimactivitylibrary.codeplex.com/documentation


    Regards, Soren Granfeldt
    blog is at http://blog.goverco.com | twitter at https://twitter.com/#!/MrGranfeldt

    Tuesday, February 5, 2013 3:32 PM
  • I've seen your stuff before and figure it'll be extremely useful so I've downloaded.  Do you have documentation stating how to install?  I'm not the best when it comes to installing new activities....a how to install from your perspective would help me greatly.  Thanks :)

    Edit:  Looked at the Install-Workflow.ps1....will it do literally everything I need to get the workflows, activities to show up as choices?

    side note:  probably will help later down the road in doing what i originally wanted, but I would like an explanation from M$ or someone on why an attribute with a null value cannot be "replaced"?


    • Edited by gdtilghman Tuesday, February 5, 2013 4:26 PM
    Tuesday, February 5, 2013 4:24 PM
  • I'm not sure that there is an official explanation for this. There are a lot of scenarios where the built-in functions wont cut it and that is why there is the option to write custom workflows.

    With regards to installing the workflows from my library, there should be PowerShell scripts included that'll assist you. All you need is an MPR to allow for the user running the installation script to create Activity Information Objects in the FIM Service/Portal.

    Regards, Soren Granfeldt
    blog is at http://blog.goverco.com | twitter at https://twitter.com/#!/MrGranfeldt

    Monday, February 11, 2013 7:30 AM
  • Thanks Søren.  
    Monday, February 11, 2013 2:06 PM