Dynamic initialize a PF variable with the PF name

I define a variable in a PF.
I want initialize this variable with the name of the process flow.
For example, if I created a ProcessFlow called "PF1", my variable must be dinamically set to "PF1" when the PF start.
Thanks

Hi,
You need to write some PL/SQL that looks at the activity that is running (using the actid parameter) then link to the process activities to find out the process details.
Then use the standard API to set the attribute to the value retrieved.
HTH,
Matt
WorkflowFAQ.com - the ONLY independent resource for Oracle Workflow development
Alpha review chapters from my book "Developing With Oracle Workflow" are available via my website http://www.workflowfaq.com
Have you read the blog at http://thoughts.workflowfaq.com ?
WorkflowFAQ support forum: http://forum.workflowfaq.com

Similar Messages

  • Using variable with the same name as field name?

    I have a complex proc where I have variables with the same name as field name used on a query. something like this:
    SELECT a.id_table WHERE a.id_table = id_table
    where the last id_table is a parameter sent to the proc:
    declare procedure myproc(id_table int)
    Is there any way or notation to declare the variable inside the query as a variable or I have to use a different name?

    Well, variables are not the only thing you have to change if you want to switch to Oracle.
    Although I don't think it is good practice (to use variable name same as column name), here is one example how you can achieve it using EXECUTE IMMEDIATE and bind variable
    SQL> select deptno, count(1)
      2  from scott.emp
      3  group by deptno;
        DEPTNO   COUNT(1)
            30          6
            20          5
    10 3
    SQL> set serveroutput on
    SQL> declare
      2  deptno varchar2(10);
      3  i number;
      4  begin
      5  deptno:=10;
      6  execute immediate
      7  'select count(1) from scott.emp where deptno=:deptno' into i using deptno;
      8  dbms_output.put_line('OUT ---> '||i);
      9  end;
    10  /
    OUT ---> 3
    PL/SQL procedure successfully completed.
    SQL> Message was edited by:
    tekicora
    Message was edited by:
    tekicora

  • I have an external hard drive that was formatted by a PC and has files and directories etc. I want to format it and use it on my IMAC for backup but I can't seem to write to it nor can I delete current content. How do I initialize it for use with the MAC?

    I have an external hard drive that was formatted by a PC and has files and directories copied to it etc. I want to use it on my IMAC for backup. I see it on my my IMAC . I can open files etc.  But I can't seem to write to it nor can I delete current content. I don't care if I lose current content. How do I initialize it for use with the MAC?

    You can't write to it because it's formatted as NTFS which OS X will read but not write to. If you want to continue using the drive with both a PC and OS X you will need to download and install NTFS-3G so you can then write to it from your Mac. You can get NTFS-3G at:
    http://www.macupdate.com/app/mac/24481/ntfs-3g
    If you want to use the drive exclusively with your Mac then move the data off it and reformat it in Disk Utility (Applications - Utilities - Disk Utilities) as Mac OS Extended (Journaled.)

  • How can I get the variable with the value from Thread Run method?

    We want to access a variable from the run method of a Thread externally in a class or in a method. Even though I make the variable as public /public static, I could get the value till the end of the run method only. After that scope of the variable gets lost resulting to null value in the called method/class..
    How can I get the variable with the value?
    This is sample code:
    public class SampleSynchronisation
         public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run method "+sathr.x);
    // I should get Inside the run method::: But I get only Inside
    class sampleThread extends Thread
         public String x="Inside";
         public void run()
              x+="the run method";
    NB: if i write the variable in to a file I am able to read it from external method. This I dont want to do

    We want to access a variable from the run method of a
    Thread externally in a class or in a method. I presume you mean a member variable of the thread class and not a local variable inside the run() method.
    Even
    though I make the variable as public /public static, I
    could get the value till the end of the run method
    only. After that scope of the variable gets lost
    resulting to null value in the called method/class..
    I find it easier to implement the Runnable interface rather than extending a thread. This allows your class to extend another class (ie if you extend thread you can't extend something else, but if you implement Runnable you have the ability to inherit from something). Here's how I would write it:
    public class SampleSynchronisation
      public static void main(String[] args)
        SampleSynchronisation app = new SampleSynchronisation();
      public SampleSynchronisation()
        MyRunnable runner = new MyRunnable();
        new Thread(runner).start();
        // yield this thread so other thread gets a chance to start
        Thread.yield();
        System.out.println("runner's X = " + runner.getX());
      class MyRunnable implements Runnable
        String X = null;
        // this method called from the controlling thread
        public synchronized String getX()
          return X;
        public void run()
          System.out.println("Inside MyRunnable");
          X = "MyRunnable's data";
      } // end class MyRunnable
    } // end class SampleSynchronisation>
    public class SampleSynchronisation
    public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run
    method "+sathr.x);
    // I should get Inside the run method::: But I get
    only Inside
    class sampleThread extends Thread
    public String x="Inside";
    public void run()
    x+="the run method";
    NB: if i write the variable in to a file I am able to
    read it from external method. This I dont want to do

  • How can I get the variable with the value from Thread's run method

    We want to access a variable from the run method of a Thread externally in a class or in a method. Even though I make the variable as public /public static, I could get the value till the end of the run method only. After that scope of the variable gets lost resulting to null value in the called method/class..
    How can I get the variable with the value?
    This is sample code:
    public class SampleSynchronisation
         public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run method "+sathr.x);
    /* I should get:
    Inside the run method
    But I get only:
    Inside*/
    class sampleThread extends Thread
         public String x="Inside";
         public void run()
              x+="the run method";
    NB: if i write the variable in to a file I am able to read it from external method. This I dont want to do

    Your main thread continues to run after the sathr thread is completed, consequently the output is done before the sathr thread has modified the string. You need to make the main thread pause, this will allow sathr time to run to the point where it will modify the string and then you can print it out. Another way would be to lock the object using a synchronized block to stop the main thread accessing the string until the sathr has finished with it.

  • How do I create a graph with two different y-axis variables with the same x-axis (therefor having two curves)?, How do I create a graph with two different y-axis variables with the same x-axis (therefor having two curves)?

    How do I create a graph with two different y-axis variables with the same x-axis (therefor having two curves)?, How do I create a graph with two different y-axis variables with the same x-axis (therefor having two curves)?

    Hi Libby,
    Select all three columns of data. All three must be 'regular' columns, not Header columns, and the X values must be in the leftmost column.
    Click the Charts button and choose the Scatter chart.
    The resulting chart will initially show only the first and second columns of data, and the selection will have been reduced to show this.
    Click the gear icon at the top left of the selection and choose Share X Values.
    You should see a result similar to this:
    Notes:
    The values on my sample table contain a random element, so they have changed from thhe first image to the second.
    The chart is as created by Numbers, with two edits:
    Data points have been connected with curves, using the Chart nspector.
    The curves were selected and their stroke increased to 2pts, using the stroke formating button in the format bar.
    Regards,
    Barry

  • How can i define a boolean variable with the condition if i got a specific text on a selected column?

    How can i define a boolean variable with the condition if i got a specific text on a selected column?
    Example:
    my select results:
    [id = 102] [Company = 'Microsoft']
    If i got microsoft in 'Company' i want to my another table with the columnName "Microsoft" get "true".
    Can you help me?

    That is called 2-table UPDATE.
    Example:
    http://www.sqlusa.com/bestpractices2005/updatewithcorrelatedsubquery/
    Kalman Toth Database & OLAP Architect
    Free T-SQL Scripts
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Map the user exit variables with the queries/cubes using them

    Hello Friends,
    What are the post unicode conversion tests that you can perform on front end/existing queries?
    is there any added advantage for queries due to unicode?
    is testing the working of variable  enough? is there any table to map the user exit variables with the queries/cubes using them?
    Thanks
    Tanya

    Guys, any clue about this? Answer are appreciated.
    Thanks
    Tanya

  • Unable create a target file with the same name

    Hi,
    I have to pick an attachment from a web service and place the attachment in
    a folder, with the same name (Attached File Name). I tried this using SOAP to file
    scenario. Using SOAP, I'm able to get the attachment inside PI with the same
    name, but not able to generate the file in the receiver end.
    Please let me know if this is possible or else is there any other way to do
    it.
    Regards,
    Deepak Ravi

    Check also:
    Combining three different aspects of PI (ASMA, AF Module and variable substitution) in one shot
    Dynamic Configuration vs Variable Substitution - The Ultimate Battle for the File Name
    Regards

  • Trying to move a list of form variables to session variables of the same name

    I am trying to move a list of form variables to session variables of the same name and I am having a lot of trouble.
    I have never had to post of this forum with a language question in all the 10 years I have been using ColdFusion. I was a qa Engineer @ Allaire/Macromedia back when it was going from one to the other. I have a pretty good grasp of the language.
    I have software that runs off a list. The fieldnames are variable and stored off in an array. It's survey software that runs off a "meta file". In this example; I have the number of fields in the survey set to 12 in the "metafile". I have each field declared in that file in array Session.SurveyField[1] and the above loop works fine. I include this "metafile" at the start of the process.
    I cfloop around a struct and it works wherever I have needed to use it; such as here - writing to the database for example;
    <CFQUERY NAME="InsertRec" DATASOURCE="Survey">
    INSERT into #variables.SurveyTableName#
    (EntryTime
    <cfloop from="1" to="#Session.NumberOfSurveyFields#" index="arrayindex">
    ,#Session.SurveyField[arrayindex]#
    </cfloop>
    <!--- EXAMPLE OF WHAT THE ABOVE GENERATES
    ,q01_name,q02_AcadTechORNA,q03_Water,q04_FirstAid,q05_CPR,q06_LifeGuard,q07_AED
    ,q08_ProjAdv,q09_Color,q10_SantaClaus,q11_Supervisor,q12_SupervisorOpinion --->
       VALUES
        ('#EntryTime#'
    <cfloop from="1" to="#Session.NumberOfSurveyFields#" index="arrayindex">
    <cfset thisname = "Session." & Session.SurveyField[arrayindex]>
    ,'#evaluate(variables.thisname)#'
    </cfloop>
    <!--- EXAMPLE OF WHAT THE ABOVE GENERATES
    ,'#Session.q01_name#','#Session.q02_AcadTechORNA#','#Session.q03_Water#','#Session.q04_Fi rstAid#'
    ,'#Session.q05_CPR#','#Session.q06_LifeGuard#','#Session.q07_AED#','#Session.q08_ProjAdv# ',
    ,'#Session.q09_Color#','#Session.q10_SantaClaus#','#Session.q11_Supervisor#','#Session.q1 2_SupervisorOpinion#' --->
    </CFQUERY>
    NOW HERE'S THE PROBLEM: I am running into trouble when trying to move the form variables to session variables of the same name. It is the only part of the software that I still need the datanames hard coded and that is a roadblock for me.
    <cfloop from="1" to="#Session.NumberOfSurveyFields#" index="arrayindex">
    <cfset thissessionfield = "Session." & Session.SurveyField[arrayindex]>
    <cfset thisformfield = "Form." & Session.SurveyField[arrayindex]>
    <cfset #thissessionfield# = #evaluate(thisformfield)#>
    </cfloop>
    I have tried it with or without the "evaluate"; same result. It doesn't give an error; it just ignores them (session variables look as such in the next page in the chain)
    q01_name=
    q02_acadtechorna=
    q03_water=
    q04_firstaid=
    q05_cpr=
    q06_lifeguard=
    q07_aed=
    q08_projadv=
    q09_color=
    q10_santaclaus=
    q11_supervisor=
    q12_supervisoropinion=
    Note: they exist because I CFPARAM them in a loop like the above at the start of the procedure) - and this works just fine!
    <cflock scope="Session" type="EXCLUSIVE" timeout="30">
    <cfloop from="1" to="#Session.NumberOfSurveyFields#" index="arrayindex">
    <cfset dataname = "Session." & Session.SurveyField[arrayindex]>
    <cfparam name="#variables.dataname#" default="">
    </cfloop>
    </cflock>
    I EVEN tried exploiting the Form.Fieldnames list using CFLoop over the list and the same sort of logic within and it still gives me nothing....
    Here's the FORM.FIELDNAMES value
    "Q01_NAME,Q02_ACADTECHORNA,Q03_WATER,Q04_FIRSTAID,Q05_CPR,Q06_LIFEGUARD,Q07_AED,Q08_PROJAD V,Q09_COLOR,
    Q10_SANTACLAUS,Q11_SUPERVISOR,Q12_SUPERVISOROPINION"
    Here's the logic; SAME RESULT - The session variables don't get set.
    <cfoutput>
    <cfloop list="#Form.FieldNames#" index="thisfield">
    <!--- <br>#thisfield# --->
    <cfscript>
    thisSESSIONfield = "Session." & thisfield;
    thisFORMfield = "Form." & thisfield;
    #thisSESSIONfield# = #thisFORMfield#;
    </cfscript>
    </cfloop>
    </cfoutput>
    The CFPARAM in a loop with variable output name works just fine; so does the post (which I included above) as does the SQL Create, Param Form Variables, Param Session Variables, etc.
    THIS even works for moving BLANK to each session variable, to zero them all out at the end of the process;
    <cflock scope="Session" type="EXCLUSIVE" timeout="30">
    <cfloop from="1" to="#Session.NumberOfSurveyFields#" index="arrayindex">
    <cfset thislocalfield = Session.SurveyField[arrayindex]>
    <cfscript>
    thissessionfield = "Session." & thislocalfield;
    </cfscript>
    <cfset #thissessionfield# = "">
    </cfloop>
    </cflock>
    Expanding on that code, you would think this would work, but it doesn't;
    <cfloop from="1" to="#Session.NumberOfSurveyFields#" index="arrayindex">
    <cfset thislocalfield = Session.SurveyField[arrayindex]>
    <cfscript>
    thissessionfield = "Session." & thislocalfield;
    thisformfield = "Form." & thislocalfield;
    </cfscript>
    <!--- debug --->
    <!--- <cfoutput>#thissessionfield# = "#evaluate(thisformfield)#"</cfoutput><br> --->
    <cfoutput>
    <cfset #thissessionfield# = "#evaluate(thisformfield)#">
    </cfoutput>
    </cfloop>
    And see that debug code in the middle? To add insult to injury... When I uncomment that it shows me this. So it certainly looks like this should work....
    Session.q01_name = "Me"
    Session.q02_AcadTechORNA = "N/A"
    Session.q03_Water = "Yes (certificate expired)"
    Session.q04_FirstAid = "Yes (certificate is current)"
    Session.q05_CPR = "No"
    Session.q06_LifeGuard = "Yes (certificate expired)"
    Session.q07_AED = "Yes (certificate expired)"
    Session.q08_ProjAdv = "Yes (certificate expired)"
    Session.q09_Color = "Gray"
    Session.q10_SantaClaus = "Yes"
    Session.q11_Supervisor = "Da Boss"
    Session.q12_SupervisorOpinion = "Not a bad thing"
    There must be some simpler way to do this. This way won't work against all odds even though it seems so much like it should.
    So I end up having to hardcode it; still looking for an automated way to set these #@%$*@!## session variables over the list from the form variables of the same @#@!$#%$%# name. Do I sound frustrated???
    No matter what I do, if I don't HARDCODE like this;
    <cfset Session.q01_name = Form.q01_name>
    <cfset Session.q02_AcadTechORNA = Form.q02_AcadTechORNA>
    <cfset Session.q03_Water = Form.q03_Water>
    <cfset Session.q04_FirstAid = Form.q04_FirstAid>
    <cfset Session.q05_CPR = Form.q05_CPR>
    <cfset Session.q06_LifeGuard = Form.q06_LifeGuard>
    <cfset Session.q07_AED = Form.q07_AED>
    <cfset Session.q08_ProjAdv = Form.q08_ProjAdv>
    <cfset Session.q09_Color = Form.q09_Color>
    <cfset Session.q10_SantaClaus = Form.q10_SantaClaus>
    <cfset Session.q11_Supervisor = Form.q11_Supervisor>
    <cfset Session.q12_SupervisorOpinion = Form.q12_SupervisorOpinion>
    I always get this from my next page because the session variables are empty;
    You must answer question 1.
    You must answer question 2.
    You must answer question 3.
    You must answer question 4.
    You must answer question 5.
    You must answer question 6.
    You must answer question 7.
    You must answer question 8.
    You must answer question 9.
    You must answer question 10.
    I tried duplicate as well, but I can not get the above to work...
    Can anyone help me do this thing that one would think is simple????

    I think if you use structure array syntax you should get the results you want.
    <cfloop from="1" to="#Session.NumberOfSurveyFields#" index="arrayindex">
          <cfset session[Session.SurveyField[arrayindex]] = Form[Session.SurveyField[arrayindex]]>
    </cfloop>
    Or probably even easier.
    <cfset session = duplicate(form)>

  • Can I create a lot of instance with the same name?

    I have, for a project in my studies, to create a map for an adventure game. I must create monsters on this map. For this I use a class that I called Creature. In my class Map i have to initialise the monsters but I
    choose their quantity with Math.random() so I don't know how much the map will contain. If in a loop I do: Creature monster = new Creature(); will I have different instances with the same name(I doubt)? Will I have one monster re-created in each iteration of the loop? How can I do to have different monsters in different places (my map is a matrix 2x2)?

    You would have many Creature references made, but only one variable to hold them, and it would go out of scope outside your loop. You could create a Creature array or use a List (both defined outside your loop) - as
    // array
    int numCreatures = randomGeneratedCreatureQuantity();
    Creature[] monsters = new Creature[numCreatures];
    for (int j = 0; j < numCreatures; j++) {
        monsters[j] = new Creature();
    // Or a list
    int numCreatures = randomGeneratedCreatureQuantity();
    ArrayList monsters = new ArrayList();
    for (int j = 0; j < numCreatures; j++) {
        monsters.add(new Creature());
    }Good luck
    Lee

  • Bug with workflow that creates a folder and sub folder with the same name.

    Hi,
    I've found a possible bug in SharePoint 2010 workflows. I only have access to SharePoint 2010 and SharePoint Designer 2010 over my companies intranet, afaik I don't have access to to logs or anything server side so sorry for the any missing information.
    I had some problems with a workflow in one list that needed to create some folders and subfolders in a second list. The production version did a lot more so I setup a test area with 1 list and a workflow that only does the folder creation part and have managed
    to consistently replicate this problem.
    The test list has two columns, [title] and [sub folder title]
    The workflow starts by getting the values for [title] and [sub folder title] into variables.
    It then creates a folder in the same list with the same name as [title], and then creates a sub folder under this with the name from [sub folder title]
    So the resulting structure would be:
    Test List:-
        List item with fields [title] and [sub folder title]
        [folder: title]:-
            [folder: sub folder title]
    If both folder names are different (e.g Folder1 and Folder2) then it works perfectly fine, if both folder names are the same (regardless of character case, e.g. samefolderName and sameFolderName) then the workflow fails.
    As part of the test i made the first action of the workflow to log the message "Workflow Started" to the history list. When the workflow fail there's nothing logged in the history list other than the error: "The workflow could not update the
    item, possibly because one or more columns for the item require a different type of information."
    Creating a sub folder with the same name as it's parent works fine manually but for some reason a workflow can't seem to do it in one action.
    As there's no history list entries before the error it looks like the workflow is just failing to start but if i do something like add an if statement to check if [title] and [sub folder title] are the same, and only create the subfolder when they are not
    then it runs fine doing what it's set to.
    The function of the workflow in our office was for convenience so were just working without it. Just wanted to post to see if anyone else has come across this/could try to replicate or explain this  and see if it's a SharePoint bug or something specific
    to our setup.
    thanks,
    Martin

    not sure about the specifics of your workflow, but if you're querying the list for the folders... keep in mind that a list lookup will only ever bring back ONE item... even if there are several items that meet the filter criteria... example: if i search
    a list for an item assigned to "john doe", there may be 15 tasks that meet the criteria, and it'll only grab one... this is why SP Designer WARNS you when your list lookup may exhibit this behavior.
    Scott Brickey
    MCTS, MCPD, MCITP
    www.sbrickey.com
    Strategic Data Systems - for all your SharePoint needs

  • For each loop in case of more file with the same name

    Hi, guys how works ForEachLoop in case of double file? Let's say that we got five excel file. A.xls, B.xls, C.xls, D.xls, A.xls. We got two file with A.xls. I'm going to assume that both file will be loaded. It's correct? 
    I'm asking this because I need to check if I got two file with the same name ( I got hundreds of file to load). And in the same time I need to avoid to load two file with the same title ( cause I could double the data)

    If there are duplicate file names in subfolders then you should fill the variable with the complete path. See C in this images:
    Please mark the post as answered if it answers your question | My SSIS Blog:
    http://microsoft-ssis.blogspot.com |
    Twitter

  • Reflection Classes with the same name

    Hi!
    I have a big problem with reflection. I want to reflect lots of stuff (methods, variables...) in a lot of classes with the same name immediately one after the other. It's like
    copy the file for the analysis to the right place
    do reflection and get results
    copy next file for analysis
    Important to note is, that all of the files that should be reflected have the same name.
    When I run the programm, he always only reflects the first file I gave for analysis, although I know the copying-stuff works and the new file would be there for analysis (but he does not seem to load/use it).
    Any ideas what i could do?
    Thanks!
    ET

    I'm not sure if i'm authorised to tell too much
    details, but i have to do some automated software
    analysis and therefore I need to know whats inside of
    a class and string search would not be appropriate.Why not ? What aspects of the class are you trying to examine ?
    They have the same name, because they are delivered in
    that form from a third party and it would be too much
    effort (and to much risk of errors) to rename them.Sure, if they're delivered as class files, you're unable to rename them. Without knowing more I can't advise you further.
    Why are you interested that much in that topic? Do you
    have to perform a similar task?No, I'm trying to determine if reflection is the right tool for the job. Frankly it doesn't sound like it is. But since you're not authorised to tell me more, I can't help you more.
    Dave.

  • Use two VIs with the same name, different functionality on a single Project

    Hi, I'm working with vision builder al labview, I need to integrate the vision builder migration Vis into my main program, (Is not an option), but I have multiple Vis autogenerated with the same name, how can i integrate them in the same project without dependency problems
    Thanks in advance

    Hi,
    Unless you really need tight integration between the Vision code and the rest of your LabVIEW application, or would rather not have to pay for a Vision Builder AI runtime license on the targets on which you want to deploy your final application, I would recommend you look into using the Vision Builder AI LabVIEW API instead of migrating the inspection to LabVIEW.
    The API allows to control Vision Builder AI by launching a Vision Builder AI engine, running the inspection and retrieving resulting images and results.
    The advantage of the API is that it allows for easier modification and debugging of the Vision Inspection that you designed in Vision Builder, if you need to make changes later. (i.e. all you need to do is open the inspection in Vision Builder AI, modify parameters, add steps etc).
    You won't have to change your LabVIEW application, unless you want to output additional results.
    When you build and deploy your application, you will need to install Vision Builder AI on the target machine and get a runtime license for it.
    Migrating the inspection to LabVIEW is a one way deal. If you need to make changes to the inspection, you will have to migrate the inspection again, or modify the code outside of the Vision Builder AI environment.
    As you might have noticed, the code generated is quite complex, and it is recommended to go this route only if you need really tight integration/synchronization between the vision code and the rest or your LabVIEW code, or if you would rather pay for a cheaper Vision runtime license rather than a VBAI runtime license for the deployment machine (in case of deploying multiple systems where cost is a big consideration).
    Vision Builder AI API examples are located in this folder:
    C:\Program Files (x86)\National Instruments\Vision Builder AI\API Examples\LabVIEW Examples
    Hope this helps clarify the use cases and help you make the right decision for your design.
    Best regards,
    Christophe

Maybe you are looking for