Showing results for 
Search instead for 
Do you mean 
Reply

Automatically set status or run workflow - with code customization

Hello all,

I hope that someone knows this.

We have created a program which creates SolidEdge files and uploades them to Teamcenter (short description).

Now we also want that after uploading the status of that ItemRevision is set to Released.

So my question is does somebody know a code for this, either setting the status to released or to automatically run specific workflow which will set this status.

 

Thanks.

 

13 REPLIES

Re: Automatically set status or run workflow - with code customization

We have not tried program. But there is one utility which you could try

gmo_set_rel_status -u=*** -p=**** -g=*** folder_name(This should in Home Folder of user infodba) prod_rel_status pdi_rel_status

See utilities_reference for more information.

 

regrads, 

Srinidhi

Re: Automatically set status or run workflow - with code customization

Hi Srinidhi,

Thanks for the answer. This could work but the problem is that this is done automatically only the first time when Item is created and datasets are uploaded to database. Afterwars when the change comes someone will manually create new revision and make the change. So it could happen that this utility would release this new revision even if it is not yet completed. Also after the change this revision will go thru different workflow. So unfortunately this is not acceptable solution. But it is good to know about this utility.

 

Regards,

Janez

Re: Automatically set status or run workflow - with code customization

Its better to write a run time application which shall be triggered once in a day. all newly created itemrevisions and its datasets gets status.

 

You have to see UGManager source to program one. 

 

 

Re: Automatically set status or run workflow - with code customization

I agree with you but still It will be better that the status is set the first time when Item is created and uploaded.

Because if we start utility once a day for example at 8pm when nobody is working then if someone that was doing something on the revision and did not finish, it will be a problem in the morning when he comes to work.

That is why I'm searching for a code to do this.

Re: Automatically set status or run workflow - with code customization

Then the better solution is that the users start a simple workflow which has only status-task. Then rest is managed in Rule-tree who can see the released Item Revisions. Workflow could be started for multiple targets (ItemRevisions). 

Do design a workflow is easy and to program one utility is difficult. These requirements are custom and one has to program it. It wont be ootb Utilities if you like to set status to all the datasets under ItemRevision.

Re: Automatically set status or run workflow - with code customization

Hi

 

Is you program a RAC plugin or external?

 

If its RAC you can use the com.teamcenter.services.rac.workflow.WorkflowService to submit the object to a workflow after the upload.

 

If it's a external then you can use SOA to submit. If this is the case let me know what code language you use and I'll point you in the right directionSmiley Happy

 

BR

Frank

Re: Automatically set status or run workflow - with code customization

Hi Frank,

 

It is external and the language is visual basic.

Re: Automatically set status or run workflow - with code customization

Hi

 

Hmm Siemens didn't make any SOA bindings for Visual Basic. You need to make that part in C# if you prefer .Net and perhaps call that from your VB code.

 

You might be able to use WSDL from VB but I havent tried that...its just a guessSmiley Happy

 

 If you use C# or WSDL then you need a 4-tier setup they don't work with 2-tier...

 

BR

Frank

Re: Automatically set status or run workflow - with code customization

btw if you need examples on SOA then get the soa_client.zip file from the root of Teamcenter installation media.