How to Determine Task Key based on Task Name?

Hi all, I'm trying to implement addProcessTaskInstance and I can't seem to dynamically obtain the task key. I want to find this based on the task name since this will be consistent through environments, but due to multiple development streams going on at once I can't be guaranteed that the task key will be the same in each in environment (i can be guaranteed it won't be actually). I'd rather not hard code the key in a variable in each environment if I can avoid it.
Thanks,
Ryan

Hi Ryan,
you could also use api to retrieve the task key.
          HashMap map = new HashMap();
          map.put("Process Definition.Tasks.Task Name", your_task_name);
          tcResultSet localtcResultSet = tcUtilityFactory.getUtility(tcDataProvider, "Thor.API.Operations.TaskDefinitionOperationsIntf").getTaskDetail(your_form_key, map);
          taskKey= localtcResultSet.getLongValue("Process Definition.Tasks.Key");
This would be slower than database query though.
Regards,
Ece

Similar Messages

  • How to determine Organizational Data based on User Login

    Dear all,
    How to determine organizational data based on user login in Activity transaction, currently org determination is happening after entering customer number in the transaction.
    We have used 'Responsibility' determination rule for this configuration. Now the requirement is to determine org data based on user login.
    In Org model we have assigned user to org data through a business partner. But still org data is not getting determined in the transaction.
    Please help me to trace out the problem.. your suggestions will be highly appreciated.
    Best regards
    Raghu ram

    You just have to use other organization determination rule. In your case this would be rule 10000194 (ORGMAN_12). This determination rule delivers the responsible organizational unit of the user
    User is defined as a business partner in the container attribute 'PARTNER'. If not, the system user (sy-uname) is used.
    So you have to do the following:
    - use this determination rule
    - in BP link username with employee
    - assign in PPOMA_CRM employee or user to organizational unit
    This should solve your problem.

  • How to get BP kind based on user name?

    Hi,
    How to get BP kind based on user name?
    Is there any table other than BUT000 which gives the Business partner no. and BP KIND?
    What is BLUEPRINT table?

    Hi John,
    do you mean Type:
    1     Person
    2     Organisation
    3     Group
    or Role like
    000000     Business Partner (General)
    BBP000     Vendor
    BBP001     Bidder
    BBP002     Portal Provider
    BBP003     Plant
    BBP004     Purchasing Company
    BEA001     Billing Unit
    BUP001     Contact Person
    BUP002     Prospect
    BUP003     Employee
    BUP004     Organizational Unit
    BUP005     Internet User
    The Role can be found in BUT100.
    Regards
    Gregor

  • How to use Session Key-based Request Targeting Mechanism in OCCAS ??

    I read Session Key-Based Request Targeting(chapter 5) in Developing SIP Applications.
    But, I don't work my application using this mechanism.
    I add sesssionKey function with @SipApplicationKey annotation.
    I deploy this application. And then, other machine send INVITE request.
    My application received INVITE request. But sessionKey function is not called before doInvite function is called.
    I used @SipApplicationKey(applicationName="...") annotation.
    It didn't work.
    sample code is following.
    Could someone help me?
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletContext;
    import javax.servlet.ServletException;
    import javax.servlet.sip.SipFactory;
    import javax.servlet.sip.SipServlet;
    import javax.servlet.sip.SipServletMessage;
    import javax.servlet.sip.SipServletRequest;
    import javax.servlet.sip.SipServletResponse;
    import javax.servlet.sip.SipURI;
    import javax.servlet.sip.URI;
    import javax.servlet.sip.annotation.SipApplicationKey;
    public class app2SipServlet extends SipServlet {
    private static final long serialVersionUID = 1L;
    public static SipFactory sipFactory;
    public static ServletContext sc;
    public void init(ServletConfig cfg) throws ServletException {
    super.init(cfg);
    sipFactory = getSipFactory();
    sc = getServletContext();
    trace("+++ app2SipServlet Initialization");          
    @SipApplicationKey
    public static String sessionKey(SipServletRequest req) {
    String appid = req.getHeader("ApplicationID");
    System.out.println("application id : " + appid);
    return appid;
    @Override
    public void doRequest(SipServletRequest req)     throws ServletException, IOException {
    trace(req, "doRequest()");
    super.doRequest(req);
    @Override
    protected void doInvite(SipServletRequest req) throws ServletException, IOException {
    URI from = req.getFrom().getURI();
    String user = ((SipURI)from).getUser();
    trace(user + " : " + req.getSession().getApplicationSession().getId());
    trace(user + " : " + req.getSession().getApplicationSession().getApplicationName());
    SipServletResponse resp = req.createResponse(200);
    resp.send();
    trace(resp);
    }

    How many servlets you have defined in your sip.xml .If there are multiple you may want to check if
    -- You have defined main-servlet ?
    -- or Is deployment descriptor version 1.0 or 1.1

  • How to create a record based on the name of a file in the file-system?

    Hi,
    With a lot of pictures I want to have a database to gather some information about these pictures.
    First question is how to generate a record based on a file in the file system?
    e.g. the pictures are "c:\fotos\2009\01\disc_001.jpg" to "c:\foto\2009\01\dis_98.jpg" .
    now i want to create records with as one of the attributes the name of the picture (not the picture itself). how to create these records (based on the information of the file-ssytem). i.e. the number of records should be the same as the number of pictures.
    any suggestions?
    any reaction will be appreciated.
    Leo

    Link to Create directory
    http://www.adp-gmbh.ch/ora/sql/create_directory.html
    You can create a list of files in the directory and read the list files from that directory.
    [UTL_FILE Documentation |http://download.oracle.com/docs/cd/B14117_01/appdev.101/b10802/u_file.htm#996728]
    [Solution using Java|http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:439619916584]
    SS

  • How to specify a collection-based TFS group name in process template XML

    I'm trying to modify a work item template so that only members of a certain group can modify it. I have the following:     
    <FIELD name="State" refname="System.State" type="String" reportable="dimension">
    <HELPTEXT>The workflow state of the requirement</HELPTEXT>
    <READONLY not="[project]\Requirements Editors" />
    </FIELD>
    However, I want to be able to add this group globally, or at the very least to a collection instead of a project. The questions I have are:
    I know how to add a new group to a collection (as opposed to a project), but how do I change the XML syntax to see it? I know I can use the prefix [project] to check the current project, but how can I do the same generic thing for a collection instead of
    having to name it here? I have tried [Collection] but that doesn't seem to work.
    Is there some way to make this global? That is, I don't want to have to add this group to each collection, so is there a way to make it accessible by all collections/projects? If so, what is the XML syntax I need, and how do I add the group?
    Even with the basic [project] syntax, and adding the group to a particular project I still can't seem to update the template as I get the following error: "TF212017: Work item tracking schema validation warning: TF26171: User/group '2f0bf5ee-d0f9-4441-b8ad-cbd38b00c407\WHSCC
    Requirements Editors' is not found." What am I doing wrong here?
    Thanks!

    Hi Chris,  
    Thanks for your post.
    For collection group in work item template, we should write like this: [Global]\collectiongroupname.
    The [project] mean current team project, so you need ensure you have created that Requirements Editors group in your current team project, then edit the work item type in current team project.
    And I suggest you install the TFS Power Tools, then edit work item type using VS>>TOOLS>>Process Editor. 
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to sort an xml Based on "property name or node"

    Input
    '<Email>
      <Type>Personal</Type>
      <Code>1</Code>
      <Description>[email protected]</Description>
      <LocalId>000000000000000000000000868000000001</LocalId>  
    </Email>'
    OUPUT
    '<Email>  
      <Code>1</Code>
      <Description>[email protected]</Description>
      <LocalId>000000000000000000000000868000000001</LocalId>  
      <Type>Personal</Type>
    </Email>'
    how do this using sql ? 

    DECLARE @xml as xml
    SET @xml ='<Email>
      <Type>Personal</Type>
      <Code>1</Code>
      <Description>[email protected]</Description>
      <LocalId>000000000000000000000000868000000001</LocalId>  
        <Infeliz>
    <Za>
    Fuck
    </Za>
    <Maria>
    Fuck
    </Maria>
      </Infeliz>
    </Email>'
    SELECT '<Email>' 
    + CONVERT(varchar(1000), @xml.query('for $x in (/Email/*) 
      order by local-name($x) 
                       return $x '))  
           + '</Email>'
    OUPUT - NOT OK 
    <?xml version="1.0" encoding="UTF-8"?>
    <Email>
    <Code>1</Code>
    <Description>[email protected]</Description>
    <Infeliz>
    <Za>Fuck</Za>
    <Maria>Fuck</Maria>
    </Infeliz>
    <LocalId>000000000000000000000000868000000001</LocalId>
    <Type>Personal</Type>
    </Email>
    I want so
    <?xml version="1.0" encoding="UTF-8"?>
    <Email>
    <Code>1</Code>
    <Description>[email protected]</Description>
    <Infeliz>
    <Maria>Fuck</Maria>
    <Za>Fuck</Za>
    </Infeliz>
    <LocalId>000000000000000000000000868000000001</LocalId>
    <Type>Personal</Type>
    </Email>

  • How can I pass value based on member names in a script in 11.1.1.3

    I want to pass a value to only those members of CostCenter dimension which has "5" in their name.
    Eg.
    C12345100
    C34565210
    C34217890
    So in the above case the value should exist only in the above 2 cost centers.
    Can someone guide me in the right direction to accomplish this ?
    Thanks in advance

    Just now I got more clearance on the requirement.
    I want to create blocks only on the selected Cost Centers & Business Unit combination.
    I have the following members in both these dimensions
    Cost Centers
    C12345980
    C12345981
    C12345982
    Business Unit
    BU5980
    BU5981
    BU5555
    Now I want to pass a value to one of the dense dimension members from Measure dimension (member name = CrtBlk) to only those CCs & BUs where the last 4 digit matches.
    So in this case it will be for only the first 2 cost centers.
    Thanks in advance.

  • How to use a key file in the FTP Task using and SSL connection

    In the past I have used this code to set the FTP pass word in an FTP component task in SSIS.
    Does anyone know how to use a Key file in an SSL connection to download a file from an FTP site?  If not can you tell me where I can get the C# code examples to learn how to create a script task or if there is another way in SSIS to download large files
    from an SSL FTP site?  Thank you for any help offered.
    public void Main()
    ConnectionManager FTPConn;
    FTPConn = Dts.Connections["FTPServer"];
    FTPConn.Properties["ServerPassword"].SetValue(FTPConn, Dts.Variables["FTPPassword"].Value);
    Dts.TaskResult = (int)ScriptResults.Success;
    Antonio

    You can use SFTP for this.
    This is a way of implementing SFTP in SSIS using standard tasks 
    http://visakhm.blogspot.in/2012/12/implementing-dynamic-secure-ftp-process.html
    also see
    http://blog.goanywheremft.com/2011/10/20/sftp-ftps-secure-ftp-transfers/
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to determine IE type(32 bit or 64 bit) in a task sequence while updating Java

    How to determine IE type(32 bit or 64 bit) in a task sequence
    Hi,
    Currently i have to update new version of Java after removing all the previous existing version of Java by using TS in SCCM 2007.
    we have both 32 bit and 64 bit browser in the environment. I am stucked in determining whether the browser is of 32 bit or 64 bit.
    How to determine IE type(32 bit or 64 bit) in a task sequence so that respective java can be installed for that IE browser.
    will highly appreciate quick response.
    Thanks in advance.
    Daya

    But you also need to install JRE x86 on x64 systems, since most people actually use the 32bit browsers on x64 systems.
    The detection logic is actually pretty simple -- just check the right registry hive to find the installation location of the BIN\JAVA.DLL. Both pathnames are stored in HKLM\Software\JavaSoft\Java Runtime Environment\1.7 in the registry value "JavaHome",
    but the x86 path is stored in the 32-bit hive and the x64 path is stored in the 64-bit hive.
    Lawrence Garvin, M.S., MCSA, MCITP:EA, MCDBA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2014)
    My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence%20R%20Garvin-32101
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

  • How to determine the download media required from my License key?

    Hi
    After recently rebuilding a dead PC,  The user has advised me she used to use Illustrator.
    Unfortunately the user does not have the install media available.
    Support advised my license key is a volume license for Design Standard.
    I have downloaded Design Standard (Universal) but the Licence key is not accepted.
    Can anyone advise how to determine the correct download based on my License key?
    Many thanks

    Some times you may need to sign in to volume licensing account and download
    refer
    Adobe Licensing Website | Serial numbers | Orders | Accounts

  • Task Name Field, "Blank" ("") in 2007, "Empty" (Empty) in 2010, HOW TO FILD/FILTER for empty?

    In MS Project 2007, I can use VBA code in Excel and determine if the selected task “Name” field is blanks by using the code “pj.Activecell.text <> “”.
    In MS Project 2010, blank name cells are no longer “” (or blank), they are “Empty”. How do users filter for a non-standard value of “empty” then the text of “empty” is not in the task “Name” cell?

    Hi Dan,
    Since I almost know nothing about VBA and I can only read but not write code, I'll let John or Rod (VBA kings on this forum) jump in.
    But here is what I go recording the macro:
    Sub Macro1()
    SetAutoFilter FieldName:="Name", FilterType:=pjAutoFilterIn, Criteria1:=""
    End Sub
    Also ensure to have the latest version of Project 2010 since I noticed different behaviour with blank lines with 2 different versions.
    Hope this helps,
    Guillaume Rouyre, MBA, MCP, MCTS |

  • How many DAQ tasks per loop?

    Hi to everybody, I hope anybody can help me with the next case:
    I am working on a system in which I have to read signals of 5 different sensors which have different ways to communicate (4 - 20 mA, voltage, RS-232, ModBUS, etc.) with the DAQ Device (cDAQ in my case), at same time when I am reading the variables I must check for the state of several digital inputs to verify connections and if any is interrupt I must stop the Data Acquisition.
    My question is if is recommendable to put all the tasks in a single loop with the logic shown in the attached image.
    Or if I should divide the tasks in a multiple loop architecture.
    If the answer is the second, my next question is: How many DAQ tasks per loop is OK?, my doubt is based on the number of variables that I am going to read
    and the different ways to get the measures, specially which are by protocols (ModBUS, RS-232), all this by the response time.
    Thanks in advance, all suggestions are welcome!

    I would recommend using a loop just for control and UI events.  It should only have an event structure.  Don't use the timeout case, since that just turns the system into a polling.  Use Queues to send data from the controller loop to your other loops and User Events to send data back to the controller looop.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to deactivate task complete in task properties for background task.

    Hi Workflow Experts,
          How to deactivate task complete in task properties for background task. Please suggest me.
    Thanks
    Ashraf

    Hi Ashraf,
    You misunderstood the problem. The workflow will never hang up when the Task complete icon is in green color.
    When you do agent determination and BO method assignement done properly in the task level, it shows green color.
    Try to check the workflow log and find out the issue.
    Reward points if it helps.
    Thanks,
    Saravanan.

  • MS Project - can you merge from a spreadsheet/access database based on task names?

    I'm wondering if it's possible to import data on certain tasks from a spreadsheet or access database. I know you can import tasks and append them, but I was hoping to:
    - Match a task name with the task name on the spreadsheet/access database
    - Update that task in MS project with information/fields in the spreadsheet/access database
    Can this be done? Thanks.

    Hi,
    In regarding the issue, my understanding is that you want to use Excel spreadsheet as database for the Project.
    I recommend you develop an import map that includes the key fields. Please refer to the link and do it step by step:
    http://www.techrepublic.com/blog/tech-decision-maker/importing-a-vendors-excel-schedule-into-microsoft-project/
    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
    If I misunderstanding something, please let me know and upload some sample about the Excel spreadsheet.
    Regards,
    George Zhao
    TechNet Community Support

Maybe you are looking for

  • Posting date for MB52 and MB58 transactions

    Hi, I want to add posting date on the selection screen of standard transaction MB52 and MB58 for selecting the stocks within the posting period. I want the table name and the field name for the posting date. Helpful answers will be rewarded. Thanks a

  • Extended IDOC for transaction VL02N : Error 51

    Dear, I am Working on Extended IDOC for transaction VL02N (Outbound Delivery) and stuck in Inbound with Error 51: Specifications for units and quantities contain errors VBPOK-MEINS TO LIPS-MEINS MT. Message no. VL282 How to resolve it? At Outbound Pr

  • Tabstrip and Frametext

    Hi, I look for Possibility, how we can change the Title of Frametext in a Tabstrip, which is created via screen-exit. In Customizing I can change the texts of tabstrips but not the texts of frames, which are included in tabstrips. with my Best Regard

  • HT5467 missing ipad

    To Whom it May Concern:      My name is Michelle. I have a basic question. My ipad recently came up missing on January 22, 2013. Its been a major issue because i am so attached to it. I carry it around in my purse and put it to great use. I was wonde

  • I have screwed up my email password accounts. Need help

    I tried to change my passwords but apparently either did not write down the correct password or did not input it correctly. I then tried to fix it by going into the mailbox protocols. I have even thoght about deleting the entire email accounts and re