cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Greetings. How can I send the creator of my workflow to call and send it to print. In a mail robot.

vcarmona
4-Participant

Greetings. How can I send the creator of my workflow to call and send it to print. In a mail robot.

worklow.jpg

5 REPLIES 5

  1. Create a String variable in your workflow (under properties in the top of your screenshot)
  2. Change your expression to assign the value to that String e.g.: myVar = ....
  3. In the notification robot under the Messge tab use the Variable> button to insert your variable e.g. {myVar}
vcarmona
4-Participant
(To:JørnAHansen)

I created a String variable in my workflow called "User" (see the image below), now I want to get the name of the user, and assign it to the variable. I dont know how to do that in the expression. I really dont know the expression to get the user name, How would the line code be?


I need to do the same thing with the User group, I created a variable String called "group" and I want to get the user group name and assign it to the variable (group)

Hi,

With the variable name "user" then it should simply be:

          user = (wt.doc.WTDocument)primaryBusinessObject.getCreator();

You can use the Syntax button in your first screenshot above to check if you got a valid expression.

(I'm not able to syntax check what I wrote above - so it's just written from memory)

Sorry, I'm not sure which user group you mean, a user can be a member of several groups so you have to guide me on what Windchill group object you are referring to ...

vcarmona
4-Participant
(To:JørnAHansen)

Hi,
Sorry I didnt explain my case.This is what I did:

1.- I created some users, using the "Participant Administration" form.

2.- Then I created some groups and assigned the users to a group.

Now in my workflow template I want to get the name of the group of the user and the name of the user too. So I declared a robot expression called "Get_User_Name" and I wrote  the code line  as the image below shows and I get the following error.

I hope you can help me.

Thanks.

2 issues in your code.

1 : The parenthesis. No cast in this case

2 : getCreator() returns a WTPrincipalReference, not a String, so :

user = ((wt.doc.WTDocument)pimaryBusinessObject).getCreator().getDisplayName();

Announcements

Top Tags