Clear an attribute in eDirectory via workflow

 

I have a form that is working properly with the exception of clearing. I am wanting to select a value of REMOVE_LICENSE from the static list in my workflow, and then have it remove a particular attribute from edirectory when I hit the submit button on the workflow. I can get the actual value to remove on the form by me selecting an event of onchange or onclick, but I am wanting to actually select the REMOVE value from my form and then it clear the attr in eDirectory when I hit submit...

This code below is what I have that is allows me to clear out the data on the 'form' itself like I was mentioning above that I am not interested in doing.

form.setValues("EmailLicenseException", '')

Top Replies

  • 0  

    So the form does not 'do anything'.  It is the workflow underneath it.  Do you have an action to write the value somewhere?  How is that configured.

  • 0   in reply to Geoffrey Carman

    Yes in the workflow I am able to select a value that I want written and it is successfully writing that value to my attribute in eDirectory....but now that you ask I don't know how it is writing that value after I click on the submit button. I am a newbie on the workflows.....hopefully I can learn something from your response and educating me on how the actually writing to eDir from the workflow takes place. Thank you for your time!

  • 0   in reply to wferguson

    Ok, so then some PRD basics.  We call it a workflow, but it has two major components.  The Form (front end, human interface) and the Workflow itself.  You see this in Designer, where there is a tab for forms and for workflows.

    This is true even for SOAP started PRD's you have to provide the <dataitem> nodes for each field in the form.  I.e. pre-fill the form that is passed to the workflow.

    I was blanking on the name of the action when I responded yesterday  In the flow part of the PRD, there is an Entity Action, where you can see all the attributes, from the DAL and there is a choice of Replace/Add/Remove values.

    I realized, I have written all about this before... So not going to redo it instead, try these two articles.  Screen shots and all!

    community.microfocus.com/.../1772528
    community.microfocus.com/.../1772535

  • 0   in reply to Geoffrey Carman

    Thank you, I enjoy reading your detailed articles.....reviewing now!

  • 0   in reply to Geoffrey Carman

    I have read the articles you wrote Geoffrey, but I apologize I still do not understand where the writes (or clearing) to eDirectory happens at. Would you mind shedding some light on that for me please?

  • 0   in reply to wferguson

    So now you understand the difference between a form and a workflow.

    The form is the front end for data collection.  Once you submit you are on the Post Activity side of the Start action in the Workflow.  (When you load the form, you execute the pre-activity side of the Start activity, load the form, and then go to the other side upon submit).

    So in the workflow itself, something has to do something with the data passed in.  This would be an Entity action.

    Right click on it, select Show Data Item Mapping.

    That shows more like this:

    You can see all the attributes the DAL has listed for the class. You can see the actionsi n the first column.

    Alas, you cannot quite dynamically change the Modify type, shown here:

    You can set up a branch, check if you have flagged this attr as clear, and then path true is set to clear, path false is set to overwrite or whatever makes sense for you.

    You have to switch to the Properties small window (Bottom left, look for the Properties tab)

    So you chose the Entity Type from the DAL, and the Operation....  Alas, I do not know how to flip this in the workflow so that one Entity Action can either write a value or clear. So sorry, build a loop workshop time. (No bears here).

  • 0   in reply to Geoffrey Carman

    I mean, duh, right? I thought that was completely obvious from the two articles.  :)  (Kidding of course).  I know how confusing this stuff all is.  I did really want to try and clear this up in those articles. If you could point out what I missed that would have clarified this for you, I would like to know.

  • 0   in reply to Geoffrey Carman

    I do not really know what could have helped me understand it better. I still could not get a clear of the attribute to work using the workflow process. I ended up handling it via IDM logic....so in the workflow I am passing a value of REMOVE_LICENSE (this can be selected from a drop down list I created) and then on one of my loopback drivers when I see that value of REMOVE_LICENSE, I am then clearing the attribute.  

  • 0   in reply to wferguson

    Did you try the branch idea?  If you hit the case where this attribute needs a change, could do all your writes in one Entity Action, and for this one, branch, and if has a value, an entity action with a single attribute change.  Other branch if it needs to be a clear, has an Entity Action, where only one attribute is being cleared.

  • 0   in reply to Geoffrey Carman

    I did not try that since I would also have to learn how to do a branch....so coding to handle it was the quicker method. Not that I mind learning, but time did not allow for it.