2 Replies Latest reply: Oct 18, 2012 11:57 AM by user1030633 RSS

    Workflow task - send email when attribute changes

    user1030633
      I need to set up an e-mail notification whenever certain user attributes change by someone in the UI. Any direction on how to set up an activity/process in the workflow for Update User that is run only when a specific user attribute is changed?
        • 1. Re: Workflow task - send email when attribute changes
          user243865
          Funny, I am just sitting and trying to get a notification to a users new manager whenever that changes through an active sync form
          the update runs a task definition called ActiveSync - Update User

          basically I added a transition from provisioning to my new state whenever an update of that specific field is in question...
          basically it tests for existence of changes in the update data... don't know if this is the right way, but it seems to work...

          Now I just have to find out if I can get to the managers email without checking out his whole user object :D

          In the following example, I transition to 'Notify New Manager' will happen IF closest_manager and at least one of the other five attributes are changed at the same time.
                  <Transition to="Notify New Manager">
                    <and>
                      <notnull>
                        <ref>user.update</ref>
                      </notnull>
                      <notnull>
                        <ref>user.update.accounts[Lighthouse]</ref>
                      </notnull>
                      <notnull>
                        <ref>user.update.accounts[Lighthouse].changes</ref>
                      </notnull>
                      <notnull>
                        <ref>user.update.accounts[Lighthouse].changes[closest_manager]</ref>
                      </notnull>
                      <or>
                        <notnull>
                          <ref>user.update.accounts[Lighthouse].changes[department]</ref>
                        </notnull>
                        <notnull>
                          <ref>user.update.accounts[Lighthouse].changes[division]</ref>
                        </notnull>
                        <notnull>
                          <ref>user.update.accounts[Lighthouse].changes[business_area_name]</ref>
                        </notnull>
                        <notnull>
                          <ref>user.update.accounts[Lighthouse].changes[business_unit_name]</ref>
                        </notnull>
                        <notnull>
                          <ref>user.update.accounts[Lighthouse].changes[company_profit_center_code]</ref>
                        </notnull>
                      </or>
                    </and>
                  </Transition>
          Edited by: Dhurgan on Oct 18, 2012 11:25 AM

          Edited by: Dhurgan on Oct 18, 2012 2:35 PM
          Fixed the code, the first didn't work as expected, this does :D
          • 2. Re: Workflow task - send email when attribute changes
            user1030633
            Awesome - worked perfectly.

            Thanks.