Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Question on workflow with edition
Balu110
I am in the process of developing an edition workflow to deploy files (say about 1000+ files) into various environments (like Testing then to Staging and then to Production) through different testing & approval process. I wanted to know, whether we can change the edition workflow name dynamically in the existing workflow job?
For example, say a workflow job #1 is fired with edition1, which passed Testing environment but encountering an error in Staging. So user is creating a new edition2 after modifying file or set of files. Now is it possible to change the edition from 1 to 2 in the existing workflow job #1? So the user will use the existing job (job #1) instead of ending the job #1 and creating a new job #2.
Thanks in advance,
Balu.
Find more posts tagged with
Comments
jbonifaci
Do you always want the latest edition? If so, just code it to use the latest edition. Otherwise you'll have to add something like a cgi task for the user to be able to enter the name of the new edition they want to use.
~Jeff
nipper
Your questions are not making a lot of sense. I am not certain you know how OD, Editions, WF etc
are supposed to work.
A lot of this depends on how you are deploying content (TS, date based, etc) and how/when you
are creating editions.
OD can be told to deploy the very latest edition. So if you do that & use a date based comparison,
it should work.
If you do not want ot deploy the lates edition, you can pass a WF variable to the OD script to
change the edition number.
Balu110
Currently I am using a cgi task to list the available editions, which will enable the user to select the required edition. So It is not always the latest edition.
I am passing in the edition name from CGI task to workflow. So the question is,.. Is there a way to change the edition name in the existing work flow job?
Edited by Balu on 10/10/05 11:23 AM (server time).
nipper
you can code anything. given enough time and money. and that you do not have Smitty
that being said, how do you propose the system deicdes what deployment goes ? another CGI task ?
some event you can see in a script ?
decide how that happens and either kickoff another OD step with the new edition or set a WF variable
to signal that a new edition should go.
Also, this is a seriously single threaded WF design. If multiple WFs like this run in parellel, the results
will be unpredictable.
Migrateduser
I should be offended but I'm not. And mentioning my name allows me to post a frivolous response that serves no useful purpose other than to add one to my post count. Thank you for your prodding.
And for the record, at least I try and find an efficient way to do things. As a contractor, you will find the path of most hours to get to the desired result. Not that I think that's wrong by any means. I'm just pointing it out.
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com
nipper
well, you can always go back and call Kelly a girl. Again.
jbonifaci
As I said before, either code your workflow to deploy the latest edition or have them select it. If you have them select it in a cgi task, have your cgi task update the workflow variable you are storing the name of the edition in. If you don't have it as a workflow or task variable and are instead just passing it on the command line, I would recommend changing it to be a workflow or task variable.
~Jeff
Migrateduser
Ha! I almost did.
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com
Balu110
Hi Jeff,
My customer wants to edition selection, which will enable them to deploy the editions they want, if any serious error occurs in the environment.
So could you give some idea..how to I dynamically change the edition name? Currently I am getting the edition name before triggering the actual workflow job through TAG_info.
Attaching the workflow for you reference.
Thanks,
jbonifaci
Add a transition option to each of your group tasks called something like 'Change Edition'. Call it something more descriptive, but you get the idea. This will transition to a cgitask where the user can select a new edition. Then, based on what the user selects, update the edition task variable for the appropriate task.
~Jeff
Balu110
Hi Jeff,
After some research and reading, now I able to list the available editions through "cgitask" but having hard time in sending the variables back to the workflow. Is there any sample code or reference is available?
Did anyone have similar problem?
Any help on this greatly appreciated,
Adam Stoller
Perhaps if you post the relevant code it will be easier to assist you.
Do you understand how to use the TeamSite::WFtask and TeamSite::WFworkflow modules? If so, you shouldn't have any problem sending information back to the workflow from a cgitask script.
Perhaps you should read the
Workflow Tutorial Supplement
- it's old, but not really out of date.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Balu110
Hi Fish,
I have gone through the Tutorial and customized the "sample_cgi_task.ipl" but for some reason still I am unable to pass the values from the CGI task to main job. Not seeing any errors in logs. Attached the files for your information.
Also I defined some variable at workflow level, which I want to pass onto IPLs through variable tag,
------------------------------------
<workflow>
..
--
<variables>
<variable key="edition" value="__INSERT__($edition);"/>
</variables>
<externaltask name="deploy_to_test"
owner="__TAG__('iw_user');"
start='f'
description="Deploy to Test task">
<areavpath v="__TAG__('iw_workarea');"/>
........
........
<command v="__INSERT__("$iwhome");/iw-perl/bin/iwperl __INSERT__("$iwhome");/httpd/iw-bin/wft_opendeploy.ipl"/>
<wfvarfinishop op="set" name="cbval" value="0"/>
<wfvarfinishop op="set" name="edition" value="__INSERT__($edition);"/>
<variables>
<variable key="od_cfg" value="edition-deploy"/>
<variable key="deploy_type" value="edition"/>
<variable key="dest_env" value="Test;" />
<variable key="dest_website" value="__INSERT__($dest_brand_site);"/>
<variable key="branch" value="__INSERT__($working_branch);"/>
<variable key="edition" value="__INSERT__($edition);"/>
</variables>
</externaltask>
..
..
</workflow>
----------------------------------------
In the above case, I change the edition name from cgitask, then how would I pass onto ipl?
Any help on this greatly appreciated.
Thanks in advance,
Adam Stoller
The code for doing this *seems* to be in the script.
$workflow->SetVariable("edition", $edition);
That should change the value of the job variable in the workflow object.
my $edition = $workflow->GetVariable("edition");
is how you would retrieve the value of the job variable in another script.
Perhaps I'm not understanding the problem you're trying to solve - but it looks like you have the correct pieces there.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Balu110
I am able to pass the parameters between CGI tasks and resolved my issues.
Thanks Fish, Jeff and others for your time and directions.
Balu.