RainerVM's Posts

Hi Community-Members, I want to have a vCO WebView where I start a defined single workflow without tree/list pane which has as an input field the Userdisplayname of the current logged on user,... See more...
Hi Community-Members, I want to have a vCO WebView where I start a defined single workflow without tree/list pane which has as an input field the Userdisplayname of the current logged on user, therfore I have a workflow where the input field has as default value #__userdisplayname. When I start the workflow direct in vCO Client all works fine. But when I start the workflow from the WebView then allways "Internal" will be displayed as username and not the real userndisplayname. I call the workflow with this webview command: <span jwcid="@vmo:WorkflowLink" workflow="objWfServerRequest" webformPage="ognl:webviewUrl + '/webform.html'" isDialog="true" isAutostart="never" width="0.9" height="0.9" returnUrl="ognl:webviewUrl" cancelUrl="ognl:webviewUrl"> I also tried to use the defaultValues-Property of the vmo:WorkflowLink component. As described in the documentation it will be needed to set the value like this: - > Use the format #{"foo":"foo value", "bar":"bar value"} to construct a map in OGNL. But double qoutes are not possible in the WebView command, they are used to define the component property. When I use single quotes I think it should look like this: - > defaultValues="ognl:{'inRequesterName:ognl:page.user.displayName'} But then I got this errormessage: "Error converting value for template parameter defaultValues: No type converter for type java.util.HashMap is available." What I'm doing wrong? Please could you help me to fix this? Many thanks Rainer
Hi Tanvirao, that's right, because the actions are not part of the plugin, they are written by myself and as mentioned I attached them to the community post. As the isValidVcoLogin-action you ... See more...
Hi Tanvirao, that's right, because the actions are not part of the plugin, they are written by myself and as mentioned I attached them to the community post. As the isValidVcoLogin-action you have to download them from my earlier community posts and import them to vco. Rainer
Hi Tanvirao, I found no possibility in vCO to execute custom Ldap-Query, but with the Microsoft-Plugin you are able to get some (not all) AD-Object attributes. The Manager-Attribute is al... See more...
Hi Tanvirao, I found no possibility in vCO to execute custom Ldap-Query, but with the Microsoft-Plugin you are able to get some (not all) AD-Object attributes. The Manager-Attribute is also available. vCO handles with different Ldap-Objects one is LdapUser and the same of MS-Plugin is Microsoft:User, with the LdapUser-Object you can't get the manager attribute, but with it you get the LdapUser of the current runnig workfow execution user. I wrote two actions which you will find attached. One to convert the LdapUser-Object into the MS-Plugin-User-Object and the other to get a Property of the MS-UserObject. With following script code you will get the Ldap-Object of the Manager using both actions: var objLdapManager = null; var objLdapUser = Server.getCurrentLdapUser(); var objADUser = System.getModule("com.alstom.vco4.basic").convertLdapUserIntoAdUser(objLdapUser); var strManager = System.getModule("com.alstom.vco4.basic").getAdUserAttribute(objADUser,"manager"); if (strManager != null) { objLdapManager = Server.getLdapElement(strManager); System.log("The manager of '" + objLdapUser.commonName + "' is '" + objLdapManager.commonName + "'."); } else { System.log("The manager of '" + objLdapUser.commonName + "' couldn't be found."); } Hope this helps. Rainer
Hi Tanvi, where is your manager defined? In the LDAP-User-Object of the workfow running user (the requester)? Or do you have a special database where you have defined the managers for spec... See more...
Hi Tanvi, where is your manager defined? In the LDAP-User-Object of the workfow running user (the requester)? Or do you have a special database where you have defined the managers for specific requesters? Rainer
Hi Tanvi, we had a similar problem, and I found a working solution for us maybe you can use it, too. We have a workflow which will be executed from a Requester (which only has the rig... See more...
Hi Tanvi, we had a similar problem, and I found a working solution for us maybe you can use it, too. We have a workflow which will be executed from a Requester (which only has the rights to execute this single workflow, no loginrights to vCenter), but because of the running credentials of this workflow it is not possible to create VMs within this workflow. The trick is to start a second workflow with other credentials (enough rights to execute other workflows in vCO and rights to create VMs in vCenter). Therefore I made an "User interaction" in the "Requester"-Workflow where the Operator has to put in his credentials to run the second workflow. To check if the credentials are valid I wrote the attached action. This action has two input parameters (LoginCredentials and the LdapGroup to check if the user is member of). If the given login user is member of the vCO-Administrator-Group or member of the given LdapGroup, the action results true otherwise false. The action has one known issue: If you have a multi domain environment (as we do) and accounts with the same name you will get true also if only one of the users has the needed rights. To use that action to validate the user in the "Request"-workflow, you should use the "Custom validation"-property, the only problem is that you have to create it on an other field than the credential input, because it is not available in vCO on a credential object The value could be like this: ( GetAction("com.alstom.vco4.basic","isValidVcoLogin").call( #operatorCredential,#securityGroup ) ) ? true : "Credentials are not valid." I hope that helps. Best regards, Rainer
Hi Community, does anybody know if it is possible to get the Answer URL from a Worklfow execution using Perspectives-WebView, to use it in an email notification? ( Similar to the method Workf... See more...
Hi Community, does anybody know if it is possible to get the Answer URL from a Worklfow execution using Perspectives-WebView, to use it in an email notification? ( Similar to the method WorkflowToken.getAnswerUrl() ) Best regards Rainer
Hi Angela, sorry this works also not, because during the execution of the workflow there is no endDate available. And doing the same with the startDate doesn't work either, because it could be... See more...
Hi Angela, sorry this works also not, because during the execution of the workflow there is no endDate available. And doing the same with the startDate doesn't work either, because it could be that another workflow has been started a view milliseconds later than the current, then I would get the other one and not the current running. But I found a way to get the current workflow token by myself, a bit tricky but it works For everyone who is interested in - here you will find the code of an Action (I called it getCurrentWfToken): Input: none (but must be used within a workflow) Output: WorkflowToken of the current running workflow var objWfToken = null; try { var strAnswerUrl = workflow.getAnswerUrl().url; var strWfTokenId = strAnswerUrl .replace(/^(\[\s\S]TokenId=)|(&returnUrl\[\s\S])$/g,""); objWfToken = Server.findForType("WorkflowToken",strWfTokenId); } catch (objErrMsg) { System.error(objErrMsg); } return objWfToken;
Hi Angela, thank you for your fast reply, but no that's not what I'm looking for, to get the workflow execution list (WorkflowTokens) is no problem (using a Action or the 'User interaction... See more...
Hi Angela, thank you for your fast reply, but no that's not what I'm looking for, to get the workflow execution list (WorkflowTokens) is no problem (using a Action or the 'User interaction' all possible). My problem is to know which single token of these listed tokens is the token of the current running workflow.
Hi Community, how can I get the workflow token of the current running workflow? I know that it is possible to get the workflow token when I start the workflow with the execute method,... See more...
Hi Community, how can I get the workflow token of the current running workflow? I know that it is possible to get the workflow token when I start the workflow with the execute method, but what about within an already running workflow? Best regards, Rainer