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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

New action to launch Workflow

aemaeth.2501
1-Newbie

New action to launch Workflow

Hi,

I currently am trying to add an action on a certain soft-type of WTDocument to allow starting a workflow with this object as PBO.

I'm able to add the action in the UI "pointing" to a jsp and after some study, determined that using the OOTB "start-worflow" webject is the best thing to do (but if you have another solution, I'm always interested).

But how to get and pass the parameter needed by this webject in a jsp ? (meaning : I don't even have a clue on how to do it). Indeed, My action will be added directly in the list of choices (with check-out, check-in, download, setstate, etc... actions).

I'm not a professionnal programmer and still learning but any help will be appreciated.

Edit : I didn't told that I were on ProjectLink 9.1M050.

Sincerely,

Thibault Magné

8 REPLIES 8

Hi,

I don't know if my question is not clear of if it is too complicated. I'm still investigating on this but any help would be greetly appreciated.

Sincerely,

Thibault Magné

You create a form processor, link it to an action. Launch the workflow from
the doOperation. You can also launch workflow via ajax.



From: Thibault Magné [

Hi,

Thank you very much for this clues. I'll investigate the Customizer's guide to create the form processor.

Sincerely,

Thibault Magné

I'm sorry to ask some precisions.

Indeed, I added a new action (actions and actionmodels) for the WTDocument type. Added then the corresponding items into the rbInfo file.

Linked it to a simple formprocessor with a doOperation() printing the console.

But when I compile and deploy the cutomizations the new item doesn't show into the "action" menu of WTDocument.

Note : in the attachements files, action I try to create is named "test"

I'm sorry to "beg" for some help, but customizer's guide is quite imprecise on that point (in my point of view though).

Sincerely,

Thibault Magné

Did you reload the action models? I think if you restart windchill it does it automatically.

Did you build your resource file? That would prevent the new text from showing in the menu.

Just some thoughts

Sent from my iPhone

On Dec 22, 2010, at 3:39 PM, "Thibault Magné" <-> wrote:

> I'm sorry to ask some precisions.
>
> Indeed, I added a new action (actions and actionmodels) for the WTDocument type. Added then the corresponding items into the rbInfo file.
>
> Linked it to a simple formprocessor with a doOperation() printing the console.
>
> But when I compile and deploy the cutomizations the new item doesn't show into the "action" menu of WTDocument.
>
> Note : in the attachements files, action I try to create is named "test"
>
> I'm sorry to "beg" for some help, but customizer's guide is quite imprecise on that point (in my point of view though).
>
>
>
> Sincerely,
>
>
>
> Thibault Magné
>
>
>
>
> Attachment Links: documentResource.rbInfo (40 k) testObjectFormProcessor.java (1 k) DocumentManagement-actionmodels.xml (9 k) DocumentManagement-actions.xml (17 k) documentResource.rbInfo (40 k)
> Site Links: View post online View mailing list online Send new post via email Unsubscribe from this mailing list Manage your subscription
>
> Use of this email content is governed by the terms of service at:
>

First, I would like to thank you for your answers !

The advices you provided will allow me to investigate further and to identify why this actions doesn't show.

I didn't know the &jcaDebug option and in this case (and others) it will be very useful.

I reloaded the action model and resource file correctly I think : rb corresponding classes and recompiled with success.

During testing, I modify OOTB files, but as soon I get something working, I put it into customization folder correctly (wtCustom, action*, etc.)

Thanks again !

edit : Thank to your remarks, I managed to add the action. Now I'm trying to launch the workflow. Which is the "best practice" to do it ? Using webjects, i*e task or directly java code (if this is the last, which class or package may I use ?).

Sincerely,

Thibault Magné

I finally managed to create a new action, hook it in the UI , make it lauch a workflow and even create a new filter with business logicto disable this action based on certain criterias.

Thank you very much for your help : I learned much about UI, validation, etc.

Sincerely,

Thibault Magné

Can Share me piece of code that launches WF ?

Top Tags