Prompting for email address, defaulting to the email address of the executor

Last post 09-19-2016, 12:01 PM by ZeroCool. 1 replies.
Sort Posts: Previous Next
  • Prompting for email address, defaulting to the email address of the executor
    Posted: 07-06-2016, 7:33 AM

    I know I can put "xpath:{/workflow/system/executor/userName}" in one of the email address fields on an email object and it will put the email address of that user.

    I want to have a workflow prompt for an email address though, defaulting to the executing user's email address, but allow the user to change the email address, if they want.  Using the above variable outside of the email form though, just gives the actual username of the executor, not the email address.

    What's the best way to pull the email address of the executor in a non-email object input?

     

    For a simplified example, have a workflow of just a PopupInput box with an input of "email" and value of "xpath:{/workflow/system/executor/userName}"

     

    <?xml version="1.0" encoding="UTF-8"?>
    <Workflow_WorkflowDefinition description="" inputSchema="&lt;xs:schema xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:tns=&quot;S_287d59a7-9e6e-4507-b3d0-3c3e156c3cb2&quot; targetNamespace=&quot;S_287d59a7-9e6e-4507-b3d0-3c3e156c3cb2&quot;>&lt;xs:element name=&quot;inputs&quot;>&lt;xs:complexType>&lt;xs:sequence />&lt;/xs:complexType>&lt;/xs:element>&lt;/xs:schema>" inputs="&lt;inputs />" interactive="1" name="RJR - Tester" outputSchema="&lt;xs:schema xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:tns=&quot;S_7bc6b0fb-ecc4-468b-b034-bc3bd6af4e2f&quot; targetNamespace=&quot;S_7bc6b0fb-ecc4-468b-b034-bc3bd6af4e2f&quot;>&lt;xs:element name=&quot;outputs&quot;>&lt;xs:complexType>&lt;xs:sequence />&lt;/xs:complexType>&lt;/xs:element>&lt;/xs:schema>" outputs="&lt;outputs />" revision="$Revision: $" uniqueGuid="569376ab-f3f9-4dcf-95aa-2bf9c334f1d6" variableSchema="&lt;xs:schema xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:tns=&quot;S_3d8dc8a1-0f58-4005-b849-c5dfe6b3add3&quot; targetNamespace=&quot;S_3d8dc8a1-0f58-4005-b849-c5dfe6b3add3&quot;>&lt;xs:element name=&quot;variables&quot;>&lt;xs:complexType>&lt;xs:sequence />&lt;/xs:complexType>&lt;/xs:element>&lt;/xs:schema>" variables="&lt;variables />">
    <Start continueOnFailure="0" created="0" description="" displayName="Start" height="36" interactive="0" name="Start" skipAttempt="0" style="image;image=/images/jgraphx/house.png" uniqueName="Start_1" waitSetting="0" width="61" x="45" y="41">
    <inputs val="&lt;inputs />"/>
    <transition activity="PopupInput_1" points="" sourceX="75" sourceY="59" status="0" style="defaultEdge" targetX="231" targetY="70" transitionIndex="0" x="0" y="0">
    <condition script="/*&#xa;The expression should return a boolean. Use the variable name &quot;activity&quot; to refer to the previous activity object. Example:&#xa;activity.exitCode==0;&#xa;*/&#xa;"/>
    </transition>
    </Start>
    <Activity continueOnFailure="0" created="1467804180250" description="popups an input form for the user to fill out" displayName="PopupInput" height="34" interactive="0" name="PopupInput" namespaceUri="commvault.cte.workflow.activities" schema="&lt;xs:schema xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:tns=&quot;S_4cc2b271-9dc3-4f5b-96a0-6b87ecf84ceb&quot; targetNamespace=&quot;S_4cc2b271-9dc3-4f5b-96a0-6b87ecf84ceb&quot;>&lt;xs:complexType name=&quot;PopupInput&quot;>&lt;xs:sequence>&lt;xs:element name=&quot;inputs&quot;>&lt;xs:complexType>&lt;xs:sequence>&lt;xs:element name=&quot;email&quot; type=&quot;xs:string&quot; minOccurs=&quot;0&quot;>&lt;xs:annotation>&lt;xs:appinfo>&lt;readOnly>false&lt;/readOnly>&lt;displayName>&lt;/displayName>&lt;controlType>TEXTBOX&lt;/controlType>&lt;searchable>false&lt;/searchable>&lt;controlAlignment>&lt;/controlAlignment>&lt;/xs:appinfo>&lt;xs:documentation>&lt;/xs:documentation>&lt;/xs:annotation>&lt;/xs:element>&lt;/xs:sequence>&lt;/xs:complexType>&lt;/xs:element>&lt;xs:element name=&quot;outputs&quot;>&lt;xs:complexType>&lt;xs:sequence>&lt;xs:element name=&quot;email&quot; type=&quot;xs:string&quot; minOccurs=&quot;0&quot;>&lt;xs:annotation>&lt;xs:appinfo>&lt;readOnly>false&lt;/readOnly>&lt;displayName>&lt;/displayName>&lt;controlType>TEXTBOX&lt;/controlType>&lt;searchable>false&lt;/searchable>&lt;controlAlignment>&lt;/controlAlignment>&lt;/xs:appinfo>&lt;xs:documentation>&lt;/xs:documentation>&lt;/xs:annotation>&lt;/xs:element>&lt;xs:element name=&quot;okClicked&quot; type=&quot;xs:boolean&quot; minOccurs=&quot;0&quot;>&lt;xs:annotation>&lt;xs:appinfo>&lt;readOnly>false&lt;/readOnly>&lt;displayName />&lt;controlType>CHECKBOX&lt;/controlType>&lt;searchable>false&lt;/searchable>&lt;controlAlignment />&lt;/xs:appinfo>&lt;xs:documentation>&lt;/xs:documentation>&lt;/xs:annotation>&lt;/xs:element>&lt;xs:element name=&quot;actionSelected&quot; type=&quot;xs:string&quot; minOccurs=&quot;0&quot;>&lt;xs:annotation>&lt;xs:appinfo>&lt;readOnly>false&lt;/readOnly>&lt;displayName />&lt;controlType>TEXTBOX&lt;/controlType>&lt;searchable>false&lt;/searchable>&lt;controlAlignment />&lt;/xs:appinfo>&lt;xs:documentation>&lt;/xs:documentation>&lt;/xs:annotation>&lt;/xs:element>&lt;/xs:sequence>&lt;/xs:complexType>&lt;/xs:element>&lt;/xs:sequence>&lt;/xs:complexType>&lt;/xs:schema>" skipAttempt="0" style="label;image=PopupInput" uniqueName="PopupInput_1" waitSetting="0" width="106" x="178" y="53">
    <inputs val="&lt;inputs>&lt;inputs>&lt;email class=&quot;java.lang.String&quot;>xpath:{/workflow/system/executor/userName}&lt;/email>&lt;/inputs>&lt;subject>Email Address&lt;/subject>&lt;formProperties />&lt;/inputs>"/>
    </Activity>
    </Workflow_WorkflowDefinition>
  • Re: Prompting for email address, defaulting to the email address of the executor
    Posted: 09-19-2016, 12:01 PM

    In my case, I have an email address attached to all users in my Commcell.

    In the same manner that you describe, I have a popup box asking for the user's email address. 

    Beforehand, I have a SQL query that performs a simple lookup:

     

    select email from dbo.UMUsers where login = 'xpath:{/workflow/system/executor/userName}'

     

    The email entry of the popup box will have this entry as the default, but allow them to change it. I have found this to be pretty reliable way of getting that information.

The content of the forums, threads and posts reflects the thoughts and opinions of each author, and does not represent the thoughts, opinions, plans or strategies of Commvault Systems, Inc. ("Commvault") and Commvault undertakes no obligation to update, correct or modify any statements made in this forum. Any and all third party links, statements, comments, or feedback posted to, or otherwise provided by this forum, thread or post are not affiliated with, nor endorsed by, Commvault.
Commvault, Commvault and logo, the “CV” logo, Commvault Systems, Solving Forward, SIM, Singular Information Management, Simpana, Commvault Galaxy, Unified Data Management, QiNetix, Quick Recovery, QR, CommNet, GridStor, Vault Tracker, InnerVault, QuickSnap, QSnap, Recovery Director, CommServe, CommCell, SnapProtect, ROMS, and CommValue, are trademarks or registered trademarks of Commvault Systems, Inc. All other third party brands, products, service names, trademarks, or registered service marks are the property of and used to identify the products or services of their respective owners. All specifications are subject to change without notice.
Close
Copyright © 2019 Commvault | All Rights Reserved. | Legal | Privacy Policy