cancel
Showing results for 
Search instead for 
Did you mean: 

How to Assign a workflow to the Logged-In User

nobel
Champ in-the-making
Champ in-the-making
Hi everyone,

    I am extending the workflow. As a user login to the system, I want to assign a workflow to the logged-in user.

I mean to say that user gets login to the system. He found a link/button on the Homepage. When he clicks the link, that has to open a workflow to him to enter some property details.

When i search regarding this in the forum, i got some following key information:

var workflow = actions.create("start-workflow");
workflow.parameters.workflowName = "jbpm$wf:review";
workflow.parameters["bpm:workflowDescription"] = "A new content has been added in Draft.";
workflow.parameters["bpm:assignee"] = people.getPerson("linton");
workflow.execute(document);

But, i don't know, where to use this script [in which file to write this script and how to call the script]. Plz guide me.

Thanking u.
nobel
4 REPLIES 4

raptus
Champ in-the-making
Champ in-the-making
The only way I think is to create a rule… so you can run an action and call your script…

I don't know if there's a way to run an action-directly in Alfresco without using rules… perhaps you can modify the web-ui like an applet…

nobel
Champ in-the-making
Champ in-the-making
I am new to this. can u tell me how to create a rule through which how can i run action and call the script?
plz guide me…

thanking you,
nobel

raptus
Champ in-the-making
Champ in-the-making
A rule can be created on a specific space… so when you are in your space just click "more action" menu panel and click "run a rule"… here you can personalize your space with your rule…

I hope it will help you…

Raptus

adnangul
Champ in-the-making
Champ in-the-making
You have mentioned two problems

1. assigning to log in person
> user these variables 'person' or 'initiator'

2. Upload the script as .js file in data dictionary
On vew details pages (for folder or file) use run action option to execute the script