Test variables in built-in workflows...

I've included a simple package with 2 workflow...

the 'test' workflow is just a block of custom decision-making returning true or false on the length of the string 'test'... it works fine if you run it directly.

"the 'parentTest' workflow is just a workflow that runs the workflow 'test' and fails with: ' TypeError: cannot read property 'length' is null"

Obviously, this is a simplistic example, but what would be the right way to do it?

Thank you
Deric

Definitely a bug.

What happens is that when you put a workflow in a workflow there is a stacking complex variables managed by the same wf (if that makes sense for you) and you have here a special case where the type of the attribute cannot be determined since it was not initalized in the first place (the empty chain box has not initialized the variable).

If you try to add you decision System.log (System.getObjectClassName (testString)) box, you'll see when you run the wf, he knows it's a chain and during the execution of the parent, he does not know (the same way, he wouldn't know what an uninitialized variable.

To simulate this, you can perform in a box containing a script:

var testString;

System.log (System.getObjectClassName (testString));

To resolve this problem, you have 2 solutions.

First is to initialize your variable with the addition of a box containing a script before the decision one with:

string test = "";

An alternative withou touching the void workflows is to add it to the workflow parent as a workflow that is nested as a suborkflow.

The nested workflow is executed in a separate workflow context. Workflow will work you exactly as if you would have it run separately.

I had opened a similar bug but I would need to check with engineering, if it's quite similar and that this will be fixed by the next update.

You will have to annoy me with this again in a few days since I'm on vacation tonight!

Christophe.

Tags: VMware

Similar Questions

  • Test of the policy of workflow

    Hello

    I installed Siebel Tools and Client on my laptop for learning purposes.

    I wanted to work on the strategy of workflow conditions and learn to Workflow Automation.

    Is it possible to automate a workflow and test them in my local. ? Can someone guide me if its really possible to test these things on my local?

    Thank you :-)

    To use the workflow strategy, you need a Siebel server... The Workflow Manager components, generate triggers are used to "coordinate" the execution and the policies trigering.
    In the local environment, you can test only WF via the run-time events.

    Antonio
    BExpert, Brazil

  • the initialization of a variable in a bpel workflow to call another web service

    Hello

    I'm fairly new development bpel. I don't have a early created myself but unfortunately, I only got to work on existing projects from now on. I am wanting to add an invocation of another web service to an existing bpel service. I added the wsdl for .bpel and composite.xml files info, and I can see the operations, so my plan is to see the service properly, and I created the necessary links.

    I just need to initialize the variables that I'm passing on this web service. Basically need to invoke the web service passing in xml format that would go into these elements:

    < ns1:dataRequest >
    < ns1:appName > < / ns1:appName >
    < ns1:progName > < / ns1:progName >
    < ns1:valueUsed > < / ns1:valueUsed >
    < ns1:setting > < / ns1:setting >
    < / ns1:dataRequest >

    Can someone just point me in the right direction on this. I think I need to create a new .wsdl file that I've read so far, but I have a lot of time looking for this problem - it is low on my priorities. So I thought that it might accelerate things to go ahead and ask here before I dive into it later.

    Thank you

    Hello

    As far as I get your situation is you want to call a web service from BPEL process existing. Here are the steps that you can follow.

    (1) create a partner link in the BPEL process that calls the external Web service.
    (2) create an activiyt to invoke in BPEL process that invokes the foregoing created partner link
    (3) create an Assign activity that initializes the variable which is an entry to invoke activity.

    Let me know if you have confusion with this approach.

    Thank you
    AJ

  • Extract the Variables from Script Powershell

    Hey guys

    I am building a workflow active directory of this synchronization for the IAC database and I'm looking to make the most effective possible by reducing the amount of powershell scripts I use one only and then use the variables powershell to get what I need.

    Is it possible to extract the variables stored in a variable of workflow instead of use the output of the powershell statement?

    Has anyone built a workflow to users of this synchronization of DB works maximum efficiency on the when modified date now that mine is 28 minutes to synchronize 200 users.

    Matt

    From a design point of view, I would say to use the generic OLEDB data adapter.  There is an OleDB for Active Directory Provider called ADsDSOObject. You can find it by searching on the Microsoft site.  It can be installed as part of the standard Windows or .net.  I'm not sure. If you could get it saved on the server of PO, you would be able to do a select and use the output as native table instead of the Powershell output analysis.

    PowerShell has a tendency to be underperforming.  Certainly, I'd caution against the appellant PowerShell repeatedly in a loop.

  • How to retrieve specific message of "Get Messages(Via Mail Client)" vRO7 workflow format?

    Hello

    I try to extract the format of specific message as "XXXX:XXXX:XXX" in the body of the email.  I used the built-in workflow 'Retrieve Messages (email Client)"located in Library/Mail/from my customer to vRO Orchestrator 7. I am able to get the format properly but sometimes it contains some number/special characters. I found that the body of the email depends on the character set used when sending e-mail to the e-mail account. I use UTF - 8 in sending the e-mail to mail electronic a/c. But by extracting the specific format of the body of the email from this email a/c, I found that it is adding some special characters for the main content.

    I'm trying to parse the variable content (below) to retrieve the specific format. Is it possible, so that I can extract the exact text/content of the body of the email with the specific format? do not include any kind of number/special character in the content.

    //..................

    ...............

    conent var = bodyPart.getContent ();

    logic to extract the specific format of this contained variable...

    .. operations of strings as search() .doing, substr(), etc.

    .....

    ......

    //.................

    Thank you

    Miloud

    Could you send me a copy of this message as a file to check what are these special characters?

    The Javascript strings provide the replace() method. Here is an example which will be cleaning a string of characters that are not a space, a digit or a letter in English:

    var rawstr = "Some text Some text 123 ... ## Some text"; // a string containing some 'special' characters
    var cleanstr = rawstr.replace(/[^a-zA-Z0-9 ]/g, '');
    System.log("clean -> " + cleanstr);
    
  • Not able to run jspx Pages of BPM Application by using built-in WLS JDev ADF

    Hello

    JDeveloper 11.1.1.6 BPM 11.1.1.6, WLS 10.3.6, model: BC4J

    I created a BPM Application in JDeveloper, with a process and a ViewController ADF for user interface project and a model project
    The application is deployed on the WLS and works when I test it in the workspace of BPM.

    But the UI of the ADF is based on custom of the database data and is a bit heavy UI with lots of data and features.
    I am trying to create entire user interface in taskflows separate and use as auto generated pages created by the plugin BPM in JDev position regions.

    Can I deploy the entire application and test it in the workspace of BPM, but it takes a lot of time for the process of generation and deployment.

    So I tried to create a stand-alone page in the ADF ViewController project and use the ADF taskflows in the page to test in JDev integrated WLS.
    So in this way I can concentrate on test only the ADF UI related code and not worry the BPM process to test the user interface. (Assuming that the process works well).

    Please note that I don't want to test the BPM process (at this point), but I want to test only the built-in ADF UI of WLS.

    When I try to run the stand-alone page in WLS, it gives me the error below.

    Has anyone tried to run ADF UI pages in a BPM Application using JDeveloper.
    Is there another way to test only the pages of user interface instead of deploying the entire BPM to WLS?
    Is there a setting etc, we can change and turn the page in JDeveloper?

    Thanks for any help
    Concerning
    Sameer

    Error in JDeveloper IWLS
    -----------------------------------
    [10: 13:59] Application deployment...
    < 13 June 2012 13:13:15 EDT > < error > < hats > < BEA-149265 > < error has occurred in the execution of the request for deployment with the ID ' 1339596839457 'for task ' 0'. Error is: "weblogic.management.DeploymentException: [J2EE:160149] error in the processing of library reference." References application library, defined in weblogic pending - application.xml: [Extension name: oracle.soa.workflow.wc, exact match: false]. »
    weblogic.management.DeploymentException: [J2EE:160149] error in the processing of library reference. References application library, defined in weblogic pending - application.xml: [Extension name: oracle.soa.workflow.wc, exact match: false].
    at weblogic.application.internal.flow.CheckLibraryReferenceFlow.prepare(CheckLibraryReferenceFlow.java:26)
    to weblogic.application.internal.BaseDeployment$ 1.next(BaseDeployment.java:613)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
    at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:184)
    at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:58)
    Truncated. check the log file full stacktrace
    >
    < 13 June 2012 16:14:00 CEST > < WARNING > < hats > < BEA-149004 > < failures have been detected all introducing deploy the task of application "XXXComboApplication" >.
    < 13 June 2012 16:14:00 CEST > < WARNING > < hats > < BEA-149078 > < message 149004 track battery
    weblogic.management.DeploymentException: [J2EE:160149] error in the processing of library reference. References application library, defined in weblogic pending - application.xml: [Extension name: oracle.soa.workflow.wc, exact match: false].
    at weblogic.application.internal.flow.CheckLibraryReferenceFlow.prepare(CheckLibraryReferenceFlow.java:26)
    to weblogic.application.internal.BaseDeployment$ 1.next(BaseDeployment.java:613)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
    at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:184)
    at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:58)
    Truncated. check the log file full stacktrace
    >
    # Cannot run application XXXComboApplication due to the deployment on IntegratedWebLogicServer error.
    [10:14] # incomplete deployment. ####
    [10:14] deployment remote has failed (oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer)
    [XXXComboApplication application stopped and cancelled Server Instance IntegratedWebLogicServer]
    -----------------------------------

    Hi Sameer
    1. I know exactly what your condition is and what you're trying to do. I'll go with a few assumptions about what you have and on the basis that I say, unfortunately NO, that you try will NOT work. But there are other ways to test your stuff.

    2. you have a bpm, i.e. with a single process bpm application and a Web of TaskForms project (which has taskDetails pages that use your JSFF of fragments using the af:region tag). Don't forget to build the TaskForms project by selecting a. File TASK etc. You have a lot of things db backend and I hope that you have created entities, EJBs and DataControls. Then, you create links in JSFF etc. Everything is deployed on a full SOA domain fleded and you're good. BUT Yes, it is very tedious and painful to test. I agree.

    3. now you want to test only UI part without any process and tasks. To do this, you try to deploy on field of JDeveloper's integrated WLS and it does not work. Yes, it will fail, and it will not work. Because the domain default wls is a simple domain with just core j2ee and some modules of adf deployed. BUT your TaskForms also has some modules of bpm/soa. In JDeveloper, select your project TaskForms-> right click-> properties-> libraries project and Classpath-> right side, you see a lot of modules BPM for ex: Module of BPM. If you view it, you will see the modules (jars defined in this ex: bpm - services.jar). NOW your integrated domain name do NOT have these deployed modules, and so you get exactly the error that is entirely logical.

    4. go in your area/config integration jdeveloper and open config.xml file folder. Open the file config.xml of your entire standalone soa domain also. Search for "oracle.soa.workflow.wc" in these two files. You will find this soa area but NOT in the area of default jdeveloper. It is the question.

    5. now, you can not make your name domain integrated to work for SOA/BPM applications. This requires a lot of effort to add all modules and corrupt your domain also name. I would not recommend this.

    Now, is there another way, you can test your pages of fragment that has stuff heavy backend. Yes. In your app JDev, create a new Web project with only the ADF modules. Remember when we create an application for the PIA, it creates 2 ViewController and model projects. So everything you want is create a new ViewController project that has all the web, jsff, javax, adl added modules. In what you create DataControls for your EJBs and create or copy Fragments that you already have. Then create pages of simple jsxp as hell01.jsxp, hello2.jspx etc and include your fragments using af: region etc. You can deploy your application to the exclusion of TaskForms on domain JDeveloper. As to the level of the EAR, creating a new deployment profile. Add all (EJB) projects, including the new project viewcontroller except for process and TaskForms. I am convinced that it will work. Then you test your JSPx files directly their performance:
    http://localhost:7101/myViewWeb/faces/hello1.JSPX (assuming that the file jspx is under folder contenuWeb)
    http://localhost:7101/myViewWeb/faces/hello2.JSPX

    If none of the fragments needs input data set, you can still create a PageFlowController class and have life like prepareModel etc. methods to define the criterion of data entries. Assign to this pageflowcontroller the pagedef. So every time that you run jspx, he calls this controller pageflow. Or just have a few fields on your screen jsff that stores data and a link to a managed bean. In this way, test you and certify your screen jsff, connections, ejb code backend db stuff etc etc. Once it works, it will work if you put this jsff in file taskDetails.jspx also with maybe a few minor changes.

    If you want to really test your UI and all the backend without too much stuff to focus on the tasks of process / and NOT using soa domain, then this is the only way to go. I wouldn't recommend updating JDev field with stuff of soa/bpm. This is just my 2 cents opinion.

    Thank you
    Ravi Jegga

  • NEW Workflow guides

    Hey everybody,

    My name is Miron, and I'm a Visual effects artist and VID of Israel.

    I'm about to embark on a movie to see the 60 days that will be shot with Tv

    the F5, using AXS - R5 capture RAW SQ, 2 K, MXF

    I'm trying to understand the best workflow for the Davinci resolve 11.

    Work:

    1. receive media from camera Assistant

    2. the export Quicktime DNX36 for editorial (AVID)

    3 mp4 for download

    My question:

    I am especially concerned with RAW and traps that I could meet.

    question of demosaicing specifically RAW.

    My davinci Camera RAW-project setting is configured as follows:

    Quality: Full res-determination of decode

    Quality: Full res-willingness to play

    Decode using the: camera metadata

    Tips that you can share.

    Thank you very much, Miron Auslander

    Fix 11 beta? Not sure I would put less than 100%. Keep two copies JIC. At least test 11 execution with the workflow to ensure that no dead ends.

  • Test capacitor does not load when DAQ USB-6221 is used as a measuring device

    Forum of NOR expensive, I have a Setup (see below) which is supposed to read the tension between a capacitor and a resistor in series.  Unfortunately, I found that the capacitor is unable to load completely with the connected acquisition of data entry.  However, if I remove AI0 connection of the circuit and the capacitor charges normally...

    I would be grateful if someone could explain to me:

    • Why this happens
    • If there is a way to change my test circuit in order to fully load the DAQ capacitor is connected

    For reference, I tried to change the position of resistance and capacitor (i.e. initially the capacitor in series), and in this case, the capacitor had no problem charging.  But for my purposes, I will need to test with first series resistance because I already have a lot of maps of test which are built this way.

    The food is set up to provide 75V (the rated voltage of the capacitor) when put on and the current limit is set at 20 Ma.  With these settings my capacitor only charge about 20 or 30 V with DAQ in the circuit.

    Let me know if I can give more details and thanks in advance to those who give thought to my question,

    You may test the limits of your USB-6221 surge.  I hope that you don't him don't have not damaged.

    You should be able to use some simple resistive voltage dividers for tensions in the acceptable range.  They will limit your ability to measure the leakage current.

    Lynn

  • fieldChanged does not correctly variable day

    I have a Setup as follows:

    Screen has

    Screen B

    Screen C

    The screen has a static int public Cash.

    The screen has a labelfield that displays 2 buttons and cash. 1 button push pushing screen b. button 2 C.

    Screen B is pushed and has a random generator that adds to the ScreenA.Cash. This is done automatically when pushed.

    B screen is skipped. Screen a labelField is updated using labelfield.setText ("" + ScreenA.Cash). This works perfectly.

    C screen is pushed and clicking another, it also generates a number. Screen C implements FieldChangeListener. This random number is created inside a 'public Sub fieldChanged '. Inside the fieldChanged, ScreenA.Cash is updated.

    C screen is skipped. Screen that a labelField is updated using .setText again. This does not work perfectly.

    When the C instance screen is executed the first time a random number added to the cash is 25, but after be popped the label Cash will say 0. If I run screen C second once again and say randomly 15, after popping the Silver label said 25. This goes on and on.

    I tried several test variables and looking for the answer but can't find it. I can only think that the ScreenA.Cash updated in part fieldChanged is screwing of memorization of the number. Any ideas, I'm really stuck on this one. Help, please!

    To cover the second point first.

    I did not say that using the static variable has been the cause of the problem or making it is not static would solve the problem.  All I was saying was that from a coding perspective, using static variables is in this way is not, in my opinion, good practices.

    Now, back to the main problem.  The code you provided shows exactly what the problem: your code is:

    UiApplication.getUiApplication () .pushScreen (new screenC());
    T0. SetText ("this is screen C" + screenA.Cash);
    This setText does not work. It seems trolling with 1 click to each update. Screen C uses fieldchanged and update screenA.Cash in this.

    You have wrongly assumed that push the screen stops the Thread at that time here.  This isn't.  If the line:

    T0. SetText ("this is screen C" + screenA.Cash);

    is actually executed before you even see ScreenC.  Put a breakpoint in to confirm.

    If you want this line to be executed once you 'return' ScreenC, then you need to use pushModal, which is

    UiApplication.getUiApplication () .pushModalScreen (new screenC());

  • Categories of attachment for the OKC workflow

    Hi all

    I'm having some trouble with the variable #Attachment to the workflow, I created the attribute local #Attachment who call the attribute of the element with the following constant:

    FND:entity = OKC_CONTRACT_DOCS & pk1name = BusinessDocumentType & pk1value = - & contract_type - & pk2name = BusinessDocumentId & pk2value = - & CONTRACT_ID - & pk3name = BusinessDocumentVersion & pk3value = - & ATTACHED_DOC_VERSION-

    up to this point, all right, but when I run the process, there is that one attachment (should be three), after some research, when I checked the attribute to 'Update of the attributes' values he gave me:

    FND:entity = OKC_CONTRACT_DOCS & pk1name = BusinessDocumentType & pk1value = - & contract_type - & pk2name = BusinessDocumentId & pk2value = - & CONTRACT_ID - & pk3name = BusinessDocumentVersion & pk3value = - & ATTACHED_DOC_VERSION -& categories = OKC_REPO_CONTRACT, OKC_REPO_APP_ABSTRACT


    My question is, where can I replace/find these parameters of the categories?

    Thank you

    Adelmo

    After some research, I found the thing that became troubled.

    A basic workflow procedure OKC_REP_WF_PVT.initialize_attributes was setting this attribute point with these categories above.

    The categories are:

    OKC_REPO_SUPPORTING_DOC

    OKC_REPO_CONTRACT

    OKC_REPO_APP_ABSTRACT

    OKC_REPO_CONTRACT_IMAGE

    To change the value of this attribute, I called a step in the workflow that would set the value of this attribute as I wanted

  • workflow and fragments

    Hello

    I have a problem, I need to access a fragment within an another taskflow, how can I do?

    For example:

    I have a flow that controls the following:

    Edition of research - visualization - confirmation (after validation)

    and another stream:

    creation - confirmation (also after validation)

    My confirmation 2 options:

    1st - go to another page (easy)

    2nd - edit profile, I worked

    Basically, I want it to work, say like a ping-pong ball, between edit mode and the mode of Confirmation.

    As I see it, I have to be able to call a fragment of another stream and keep all the options that fragment as.

    Am I correct, or there is another way to do what I want?

    My version of jdeveloper is 11.1.1.7.1.

    THK in advance

    You can use a variable pageFlowScope in each workflow that has a value that contains the name of the stream - this should be accessible from each fragment in the stream.

    You can also change the setting of the page to a specific fragment.

  • CF2016 - Alias/cf_scripts / scripts on the built-in Web server

    I am following the guide lockdown here:

    http://wwwimages.Adobe.com/content/dam/ACOM/en/products/ColdFusion/PDFs/ColdFusion-2016-Lo ckdown - guide.pdf

    The guide proposes to move/cf_scripts/scripts directory, I did.

    The guide also offers using only the web server integrated access to the ColdFusion administrator, this is how I put it in place.

    The guide also indicates that you need to create an alias for the directory moved to the built-in web server.  See page 58 of the PDF.

    If you plan to use the built-in web server to access the ColdFusion administrator, you may need to create an alias for/cf_scripts/scripts if you have changed the default Script Src in ColdFusion administrator.

    To create a new Alias for/cf_scripts/scripts on the built-in web server

    If you plan to use the web server to access the ColdFusion administrator, then you must also add an alias by adding a tag context inside the tag of the located server.xml file host: /opt/cf11/cfusion/runtime/conf/server.xml

    < context path = ' / '.

    docBase = "/ opt/cf11/cfusion/wwwroot".

    Workie = "/ opt/cf11/fusion/runtime/cone/Catalina/localhost/tamp.

    alias = "/ coscripts = / opt/cf11/fusion/wwwroot/CFIDE/scripts" / >

    Restart ColdFusion, and then test by visiting /cfscripts/cfform.js on your server of builtin.

    There are a ton of typos in the present (Workie vs WorDir, vs conf cone, Pack vs coscripts vs cfscripts, tmp, etc..

    This also seems to be referencing the paths cf11 (CFIDE/scripts vs /cfscripts/cfform.js vs cf_scripts/scripts/cfform.js and cf_scripts/scripts).

    In addition, coldfusion - error.log notes the following:

    WARNING: A context path should be an empty string or start with a ' / ' and do not end with a ' / '. [The path [/] does not satisfy these criteria and has been replaced by]

    WARNING: [SetPropertiesRule] {Server/Service/engine/host/context} setting property 'alias' to ' / cf_scripts/scripts = / cf_scripts/test_scripts "did not find a corresponding property.

    The first line is not a problem, but the second line is.  alias is not a valid property of the context.

    The server.xml file is an example, and it is as follows:

    "< context path =" "docBase =" < cf_home > / wwwroot "WorkDir =" "< cf_home > / runtime/conf/Catalina/localhost/tmp" > "

    < resources >

    < base preResources = "docBase1" className = "org.apache.catalina.webresources.DirResourceSet" webAppMount ="/ aliasPath1" / > "

    < base preResources = "docBase2" className = "org.apache.catalina.webresources.DirResourceSet" webAppMount ="/ aliasPath2" / > "

    < / resource >

    < / context >

    It aligns with the Apache docs.

    I have CF installed on Windows, to F:\CF_2016\.  That's what I did to alias the directory of scripts (renamed to test_scripts for testing) for the built-in web server:

    < context path = "/" docBase = "F:/CF_2016/cfusion/wwwroot" WorkDir = "F:/CF_2016/cfusion/runtime/conf/Catalina/localhost/tmp" >

    < resources >

    < base preResources = className "F:/CF_2016/cfusion/wwwroot/cf_scripts/test_scripts" = "org.apache.catalina.webresources.DirResourceSet" webAppMount = "/ cf_scripts/scripts" / > "

    < / resource >

    < / context >

    It seems to work.  Is this correct? Wouldn't be an alias as \Scripts or /cfscripts instead of/cf_scripts/scripts?

    Why exactly should I alias this to the administrator?

    Thank you

    Hello

    I was in the same boat (we are defining a profile secure for testing) and I see no one answered you so I want to offer what we were doing.

    webAppMount = "/ {NEW_CFSCRIPTS_VIRTUAL_DIRTORYNAME" / >} "

    You see, I believe the problem you had previously was that the base should be the physical directory and the webAppMount should be the virtual directory.

    You were correct about the typos in the "official" document

    I don't know if it's important or not, but we have also created the directory "tmp" (quoted above) within the "{YOUR_DRIVE} :/. "{CFROOT} / cfusion/runtime/conf/Catalina/localhost / ' because it is not there by default.

    Kind regards
    David

  • Orchestrator + powershell script: variable

    Hello

    I want to create a workflow with an external script powershell and "scriptable task."

    First step:

    1. I set my input parameters in the "Task Scriptable" and "script" my variable entry for the external script powershell tab: scriptArgs = Variable1 + "" + Variable2;

    2. I get my variable in my outside first PowerShell script-> at this point it's OK

    3. in my outside first powershell script, I create variables $var1 and $var2

    Second step:

    1. I created a 'Scriptable task' and I want to get an exit powershell ($var1 and $var2) as a starter for my 'scriptable task. "

    I don't know how passing a powershell variable to any other 'workflow element' or 'scriptable task. "

    Invoke an external PS workflow script returns as objects of the output of type PowerShell:PowerShellRemotePSObject.

    You can use it to extract data from the output of the powershell script. Example is provided with the plugin inside the folder library/PowerShell/samples/list directory content workflow

    You can use PowerShell:PowerShellRemotePSObject to receive the output as raw xml, PowerShell:PowerShellRemotePSObject.getXml() data or using getRootObject() directlyas objects of type PowerShellPSObject, and then use getProperty (xxx)...

    Here is an excerpt of the example workflow to browse the list of files returned as a result of the invocation of the ps script.

      // Get PowerShellRemotePSObject
      var psObject = invResult.getResults();
      var directories = psObject.getRootObject();
    
      var isList =  directories instanceof Array
      if ( isList ){
      for (idx in directories){
      var item = directories[idx];
      if ( item.instanceOf('System.IO.FileInfo') ){//check type of object
      System.log( item.getProperty('FullName') );//extract value from result
      }
      }
      } else {
      System.log( directories.getProperty('FullName') );//extract value from result
      }
      }
    ...
    
  • Get logged in user name of workflow

    Looks like a simple task, but I have trouble understanding.  I would remove the username as a string within a workflow to be used in a field.  I can see the logic that is used to make the same kind of thing in the built in workflow "Create Snapshot of VMS resource pool", but in this case it is by adding the date:

    var date = new Date();

    snapName = snapNamePrefix + "" + date.toGMTString ();

    I tried to search the API browser as user name, came with credential.username

    He then tried:

    var date = new Date();

    var strUsername = new credential.username ();

    snapName = snapNamePrefix + "" + date.toGMTSTring () + "" + strUsername

    If don't know how to approach the issue (I tried with/without the new method forwards as well).  While I have your attention, is there something similar to an immediate pane, where I can see what returns a simple expression, or am I obliged to save and close the workflow, and then execute it?

    Thanks for the research!

    Dave

    Hello!

    Try to use

    var currentUserName = Server.getCredential().username;
    

    to understand the currently logged in user.

    If you want to get the user who started the workflow, you can take it from the workflowToken:

    var username = workflow.runningUserName;
    

    See the original on vcoteam.info example:

    http://www.vcoteam.info/learn-VCO/code-snippets-cancel-one-of-your-running-workflows.html

    and some general information about the WorkflowTokens:

    http://www.vcoteam.info/learn-VCO/how-to-retrieve-workflow-execution-details.html

    http://www.vcoportal.de/2012/03/workflow-reflection/

    See you soon,.

    Joerg

  • vCloud add a Workflow network card does not have a mac address

    Good day to all,

    I'm trying to add a network adapter to a vCenter orchestrator vcloud vm by using the built-in workflow, however it does not generate a mac address on the new network adapter. Does anyone know if I need to run another method in order to generate the MAC?

    It is a strange question. You must report this to the GSS so this can be checked / fixed.

    In the meantime, you can try this in an action in return for a vcloud:Task:

    vm.updateInternalState();
    var networkConnectionSection = vm.getNetworkConnectionSection();
    var networkConnections = networkConnectionSection.networkConnection.enumerate();
    
    if (networkConnections.length == 0) throw "No network connection for this VM";
    //System.log("previous Mac was " +  networkConnections[0].mACAddress);
    networkConnections[0].mACAddress = null;
    networkConnectionSection.networkConnection.remove(0);
    networkConnectionSection.networkConnection.add(networkConnections[0]);
    return vm.updateSection(networkConnectionSection);
    

    Christophe.

Maybe you are looking for