Deploy the project in Staging and production programatically

3,471 views
Skip to first unread message

Mini Francis

unread,
Aug 26, 2008, 1:04:00 AM8/26/08
to ATG_Tech
Hi,

For my task, I have to create a scheduler. Inside scheduler we have to
iterate some values from repository and create Skus and products in
the (versioned) catalog, and deploy them to TEST and LIVE without
human intervention.
Anyone have an idea about it?
I have created the product.xml, which is having sku's and product. Now
I need to import the xml into versioned catalog, and deploy them to
TEST and LIVE without human intervention.
Please help me if you have any suggestions?

Thanks
Mini

Wilco Boumans

unread,
Aug 26, 2008, 2:02:55 AM8/26/08
to atg_...@googlegroups.com

Hi,

Of course, the first question to answer is 'why is it necessary to create products in a schedule fashion?'. Do they appear in the universe automatically, and does your application need to catch up with these spontaneous creations? Assuming you have a valid answer for these questions, a way to achieve your goal:

When deploying products into a versioned repository, you have two options:

* Use the existing repository, insert the product into one, switch the repository and then insert it into the other.
However, be sure that there is not a deployment ongoing (or started) during this action. That would seriously ruin the environment.

* Use a 2nd repository (accessing the same tables as the product catalog), insert into A, switch and insert into B.
Then flush the product repository to reload any cached values. Either flush the entire catalog, or individual items (the ones you just inserted).

Be sure that the scheduled service runs only once in your entire cluster, to be 100% sure acquire a lock before starting the whole operation.
Inserting the items can be done programmatically using repository API's.

An alternative is to use SQL to achieve the same. Again flushing the repository after insertion is required to




Hope this helps,
Wilco

2008/8/26 Mini Francis <mini.fr...@gmail.com>



--
--
Wilco

Emmanuel Parasirakis

unread,
Aug 26, 2008, 10:51:21 AM8/26/08
to atg_...@googlegroups.com
The best and easiest thing to do is to download the ca-import-sample-code.jar file from the ATG download page. This is a small package that helps with exactly what you are trying to do. The package contains a workflow for importing, a class which contains code to create the project programmatically and advance the import workflow, and the properties file for that class. You will still need to create a scheduled service to kick off and call this code. You can follow the atg docs if you don't know how to create a scheduled service.

Once you download the jar file, all you need to do is create a subclass of the provided class and implement one method. That method is where you get the versioned repository and then create your repository items from the xml file you mentioned. The base class has already handled making sure that your items get created in the project.

--
Be Yourself @ mail.com!
Choose From 200+ Email Addresses
Get a Free Account at www.mail.com!

lokivog

unread,
Aug 26, 2008, 11:09:17 AM8/26/08
to ATG_Tech
Mini,

If you don’t wan to insert directly into the production repositories
then there is another approach to actually insert into the versioned
repositories programmatically.

I had a very similar situation where products, skus, and prices are
created in an external system, an Oracle ERP System, and every night
we programmatically insert and update these assets into the version
repository.

http://www.atg.com/service/main.jsp?t=solutionTab&ft=searchTab&ps=solutionPanels&locale=en_US&_dyncharset=UTF-8&solutionId=atg42304&isSrch=Yes

Check out the link above. It provides a very basic approach for
deploying a project programmatically. We had to fine tune it a bunch
to support the size of your imports but it should get you started.

Hope this helps,

Michael

Mini Francis

unread,
Aug 28, 2008, 7:45:52 AM8/28/08
to ATG_Tech
Hi all,

Thanks for the reply from all.
I need to create a workflow for my task. So I created a new workflow.
But when I tried to run, It's getting error as follows...

atg.workflow.WorkflowException: The inner project was not created.
Check that your project workflow has been initialized by the workflow
engine.
17:09:51,437 ERROR [STDERR] at
atg.epub.project.ProcessHomeMethods.initializeProcess(ProcessHomeMethods.java:
373)
17:09:51,453 ERROR [STDERR] at
atg.epub.project.ProcessHomeMethods.initializeProcessWithGlobalWorkflow(ProcessHomeMethods.java:
307)
17:09:51,453 ERROR [STDERR] at
atg.epub.project._ProcessHome_Impl.initializeProcessWithGlobalWorkflow(_ProcessHome_Impl.java:
39)
17:09:51,453 ERROR [STDERR] at
atg.epub.project.ProcessHomeMethods.createProcessForImport(ProcessHomeMethods.java:
154)
17:09:51,453 ERROR [STDERR] at
atg.epub.project._ProcessHome_Impl.createProcessForImport(_ProcessHome_Impl.java:
18)

How should I solve this?anyone can help me in this situation?

On Aug 26, 8:09 pm, lokivog <mvo...@lokion.com> wrote:
> Mini,
>
> If you don’t wan to insert directly into the production repositories
> then there is another approach to actually insert into the versioned
> repositories programmatically.
>
> I had a very similar situation where products, skus, and prices are
> created in an external system, an Oracle ERP System, and every night
> we programmatically insert and update these assets into the version
> repository.
>
> http://www.atg.com/service/main.jsp?t=solutionTab&ft=searchTab&ps=sol...

Emmanuel Parasirakis

unread,
Aug 28, 2008, 10:28:40 AM8/28/08
to atg_...@googlegroups.com
What is the name of the workflow you are using?
--
Nothing says Labor Day like 500hp of American muscle
Visit OnCars.com today.

dave_c

unread,
Aug 28, 2008, 6:09:52 PM8/28/08
to ATG_Tech
I'm using the code from the ca-import-sample-code.jar and have it
working...almost.

The issue I'm having is that the workflow never advances past the
'Wait for Staging Deployment to Complete' and 'Wait for Production
Deployment to Complete' stages. I've confirmed that my data gets
published correctly out to the Production & Staging targets. As a
result, the project is still active and my only option is to revert
back to the 'Import' task, via the BCC, which is no good since my
workspace is checked in and unable to go back.

I don't see any errors in the logs. I'm using the provided /Content
Administration/import-early.wdl workflow which I've modified only to
include my target id's.

Anybody have any suggestions?

Thanks,
Dave

Mini Francis

unread,
Aug 29, 2008, 1:52:39 AM8/29/08
to ATG_Tech
I have created a new standard workflow for my task.
After running the server got the exception as above.
I felt someone can help me.

Mini

Kelly Goetsch

unread,
Aug 29, 2008, 1:58:01 AM8/29/08
to atg_...@googlegroups.com
Someone can help, but you need to provide the path of the workflow like Manny asked. In addition to the path, can you provide any more details? How exactly did you create it? This error typically means that you're using a project-level workflow instead of a process-level. It could also mean that your project-level workflow didn't initialize properly at startup.



-----Original Message-----
From: Mini Francis <mini.fr...@gmail.com>

Date: Thu, 28 Aug 2008 22:52:39
To: ATG_Tech<atg_...@googlegroups.com>
Subject: [atg_tech:1656] Re: Deploy the project in Staging and production

Mini Francis

unread,
Aug 29, 2008, 5:30:48 AM8/29/08
to ATG_Tech
Thanks for the help.

I had configured the workflow in my property file.

I have created the new workflow through ACC

workflow-- checkin project's workspace--deploy-- deployNow--approve
and deploy project into all targets--compleet project--send workflow
complete message with status complete


I felt, the error is due to the workflow I have created .Now I have
given roles to the deploy, getting another exception.

19:34:17,953 ERROR [WorkflowProcessManager] Error while processing
individual event message of type atg.workflow.StartWorkflow; rolling
back the transaction

java.lang.NullPointerException

at
atg.epub.workflow.process.action.CheckinProject.executeAction(CheckinProject.java:
71)

at atg.process.action.ActionImpl.execute(ActionImpl.java:397)

at
atg.process.ProcessManagerService.executeAction(ProcessManagerService.java:
13591)

at
atg.process.ProcessManagerService.takeIndividualTransition(ProcessManagerService.java:
12999)

at
atg.process.ProcessManagerService.receiveIndividualEventMessage(ProcessManagerService.java:
11703)

at
atg.process.ProcessManagerService.receiveIndividualEventMessage(ProcessManagerService.java:
11170)

at
atg.process.ProcessManagerService.receiveMessage(ProcessManagerService.java:
10980)

at
atg.process.ProcessManagerService.receiveMessage(ProcessManagerService.java:
10938)

at
atg.dms.patchbay.ElementManager.deliverMessage(ElementManager.java:
294)

at atg.dms.patchbay.InputPort.onMessage(InputPort.java:168)

at
atg.dms.patchbay.InputDestination.onMessage(InputDestination.java:375)

at
atg.dms.local.MessageConsumerImpl.deliverMessage(MessageConsumerImpl.java:
274)

at atg.dms.local.TopicImpl.deliverToRecipients(TopicImpl.java:
91)

at
atg.dms.local.DestinationImpl.deliverMessage(DestinationImpl.java:238)

at
atg.dms.local.TopicPublisherImpl.publish(TopicPublisherImpl.java:141)

at
atg.dms.patchbay.OutputDestination.sendMessage(OutputDestination.java:
181)

at atg.dms.patchbay.OutputPort.sendMessage(OutputPort.java:140)

at
atg.dms.patchbay.ElementManager.sendMessage(ElementManager.java:363)

at
atg.nucleus.dms.DASMessageSource.fireObjectMessage(DASMessageSource.java:
209)

at
atg.nucleus.dms.DASMessageSource.fireObjectMessage(DASMessageSource.java:
172)

at
atg.workflow.WorkflowMessageSource.fireWorkflowMessage(WorkflowMessageSource.java:
228)

at
atg.workflow.WorkflowMessageSource.fireStartWorkflowMessage(WorkflowMessageSource.java:
164)

at
atg.workflow.WorkflowViewImpl.startWorkflow(WorkflowViewImpl.java:583)

at
atg.epub.project.ProcessHomeMethods.initializeProcess(ProcessHomeMethods.java:
368)

at
atg.epub.project.ProcessHomeMethods.initializeProcessWithGlobalWorkflow(ProcessHomeMethods.java:
307)

at
atg.epub.project._ProcessHome_Impl.initializeProcessWithGlobalWorkflow(_ProcessHome_Impl.java:
39)

at
atg.epub.project.ProcessHomeMethods.createProcessForImport(ProcessHomeMethods.java:
154)

at
atg.epub.project._ProcessHome_Impl.createProcessForImport(_ProcessHome_Impl.java:
18)

at
com.cnp.ecommerce.offerCreation.ProgramaticImportService.executeImport(ProgramaticImportService.java:
271)

at
com.cnp.ecommerce.offerCreation.RenewalKeysProcessor.doScheduledTask(RenewalKeysProcessor.java:
67)

at
atg.service.scheduler.SingletonSchedulableService.performScheduledTask(SingletonSchedulableService.java:
231)

at atg.service.scheduler.ScheduledJob.runJobs(ScheduledJob.java:
441)

at atg.service.scheduler.Scheduler$2handler.run(Scheduler.java:
760)

19:34:18,000 ERROR [MessagingManager] An error occurred while
MessageSink with nucleus name "/atg/epub/workflow/process/
WorkflowProcessManager" was receiving a Message from input port
"IndividualEvents": javax.jms.JMSException:
CONTAINER:atg.process.ProcessException;
SOURCE:java.lang.NullPointerException

19:34:18,015 ERROR [STDERR] atg.workflow.WorkflowException: The inner
project was not created. Check that your project workflow has been
initialized by the workflow engine.

19:34:18,015 ERROR [STDERR] at
atg.epub.project.ProcessHomeMethods.initializeProcess(ProcessHomeMethods.java:
373)

19:34:18,015 ERROR [STDERR] at
atg.epub.project.ProcessHomeMethods.initializeProcessWithGlobalWorkflow(ProcessHomeMethods.java:
307)

19:34:18,015 ERROR [STDERR] at
atg.epub.project._ProcessHome_Impl.initializeProcessWithGlobalWorkflow(_ProcessHome_Impl.java:
39)

19:34:18,015 ERROR [STDERR] at
atg.epub.project.ProcessHomeMethods.createProcessForImport(ProcessHomeMethods.java:
154)

19:34:18,015 ERROR [STDERR] at
atg.epub.project._ProcessHome_Impl.createProcessForImport(_ProcessHome_Impl.java:
18)

19:34:18,015 ERROR [STDERR] at
com.cnp.ecommerce.offerCreation.ProgramaticImportService.executeImport(ProgramaticImportService.java:
271)

19:34:18,015 ERROR [STDERR] at
com.cnp.ecommerce.offerCreation.RenewalKeysProcessor.doScheduledTask(RenewalKeysProcessor.java:
67)

19:34:18,015 ERROR [STDERR] at
atg.service.scheduler.SingletonSchedulableService.performScheduledTask(SingletonSchedulableService.java:
231)

19:34:18,015 ERROR [STDERR] at
atg.service.scheduler.ScheduledJob.runJobs(ScheduledJob.java:441)

19:34:18,015 ERROR [STDERR] at atg.service.scheduler.Scheduler
$2handler.run(Scheduler.java:760)



How should I solve??

Thanks
Mini.

Emmanuel Parasirakis

unread,
Aug 29, 2008, 7:20:43 AM8/29/08
to atg_...@googlegroups.com
Turn on logging for the MessagingManager component and see if a deployment complete message is getting sent and that the WorkflowProcessManager component is receiving it.

> ----- Original Message -----
> From: dave_c <david.a...@gmail.com>
> To: ATG_Tech <atg_...@googlegroups.com>
> Subject: [atg_tech:1649] Re: Deploy the project in Staging and production programatically
> Date: Thu, 28 Aug 2008 15:09:52 -0700 (PDT)
>
>
>
> I'm using the code from the ca-import-sample-code.jar and have it
> working...almost.
>
> The issue I'm having is that the workflow never advances past the
> 'Wait for Staging Deployment to Complete' and 'Wait for Production
> Deployment to Complete' stages. I've confirmed that my data gets
> published correctly out to the Production & Staging targets. As a
> result, the project is still active and my only option is to revert
> back to the 'Import' task, via the BCC, which is no good since my
> workspace is checked in and unable to go back.
>
> I don't see any errors in the logs. I'm using the provided /Content
> Administration/import-early.wdl workflow which I've modified only to
> include my target id's.
>
> Anybody have any suggestions?
>
> Thanks,
> Dave
>

Emmanuel Parasirakis

unread,
Aug 29, 2008, 7:22:54 AM8/29/08
to atg_...@googlegroups.com
You should not create your own workflow for this. You should use the ca-sample-import-code.jar that is available on the ATG site. It was
written to help with exactly what you are doing. Do you have access to the download page at atg.com?

> ----- Original Message -----
> From: "Mini Francis" <mini.fr...@gmail.com>
> To: ATG_Tech <atg_...@googlegroups.com>
> 19:34:18,015 ERROR [STDERR] atg.workflow.WorkflowException: The inner
> project was not created. Check that your project workflow has been
> initialized by the workflow engine.
>
> 19:34:18,015 ERROR [STDERR] at
> atg.epub.project.ProcessHomeMethods.initializeProcess(ProcessHomeMethods.java:
> 373)
>
> 19:34:18,015 ERROR [STDERR] at
> atg.epub.project.ProcessHomeMethods.initializeProcessWithGlobalWorkflow(ProcessHomeMethods.java:
> 307)
>
> 19:34:18,015 ERROR [STDERR] at
> atg.epub.project._ProcessHome_Impl.initializeProcessWithGlobalWorkflow(_ProcessHome_Impl.java:
> 39)
>
> 19:34:18,015 ERROR [STDERR] at
> atg.epub.project.ProcessHomeMethods.createProcessForImport(ProcessHomeMethods.java:
> 154)
>
> 19:34:18,015 ERROR [STDERR] at
> atg.epub.project._ProcessHome_Impl.createProcessForImport(_ProcessHome_Impl.java:
> 18)
>
> > Date: Thu, 28 Aug 2008 22:52:39
> > To: ATG_Tech<atg_...@googlegroups.com>
> > Subject: [atg_tech:1656] Re: Deploy the project in Staging and production
> >
> > programatically
> >
> > I have created a new standard workflow for my task.
> > After running the server got the exception as above.
> > I felt someone can help me.
> >
> > Mini
> >

Dave Cairns

unread,
Aug 29, 2008, 12:21:31 PM8/29/08
to atg_...@googlegroups.com
It appears that the message is being rec'd OK with proper status:

2008-08-29 07:26:43,778 DEBUG
[nucleusNamespace.atg.dynamo.messaging.MessagingManager] Sending
message type "atg.deployment.DeploymentStatus" to destination
"localdms:/local/EPubTopic/WorkflowManagerEvents" on port
"DeploymentStatus" for component
"/atg/epub/messaging/PublishingMessageSource"

2008-08-29 07:26:43,778 DEBUG
[nucleusNamespace.atg.dynamo.messaging.MessagingManager] Receiving
message type "atg.deployment.DeploymentStatus" from destination
"localdms:/local/EPubTopic/WorkflowManagerEvents" message
"ObjectMessage()" on port "IndividualEvents" for component
"/atg/epub/workflow/process/WorkflowProcessManager"

2008-08-29 07:26:43,778 DEBUG
[nucleusNamespace.atg.epub.workflow.process.WorkflowProcessManager]
received message on port IndividualEvents message: ObjectMessage()

2008-08-29 07:26:43,778 DEBUG
[nucleusNamespace.atg.epub.workflow.process.WorkflowProcessManager]
[message]: received an individual event message
atg.deployment.server.messaging.DeploymentStatusMessage: SUCCESS
processId: prc121001 projectId: prj121001 targetId: tar602 of type
atg.deployment.DeploymentStatus

2008-08-29 07:26:43,778 DEBUG
[nucleusNamespace.atg.epub.workflow.process.WorkflowProcessManager]
[message]: created individual execution context
ProcessExecutionContextImpl[individual,subject=process:prc121001,messageType=atg.deployment.DeploymentStatus,message=atg.deployment.server.messaging.DeploymentStatusMessage:
SUCCESS processId: prc121001 projectId: prj121001 targetId: tar602]

2008-08-29 07:26:43,778 DEBUG
[nucleusNamespace.atg.epub.workflow.process.WorkflowProcessManager]
[message]: 1 individual instances found for subject process:prc121001

2008-08-29 07:26:43,778 DEBUG
[nucleusNamespace.atg.epub.workflow.process.WorkflowProcessManager]
[message]: going through process segments registered for type
atg.deployment.DeploymentStatus for subject process:prc121001

Which makes sense as the outcome id I fire is the one that relates to
'Import Complete' which moves the deployment along to get to where I'm
stuck. How is the process supposed to advance from the 'Waiting for
Staging to complete' task? Should there be another message being fired
at the end of the deployments that triggers this process to move
along?

Thanks for the help,
Dave

Dave Cairns

unread,
Aug 29, 2008, 1:12:33 PM8/29/08
to atg_...@googlegroups.com
I think I found the issue.

I hadn't configured my WorkFlowProcessManager to designate a process
editor server to coordinate the messaging. Once I configured that via
the workflowProcessManager.xml file the messages I expected now are
getting routed correctly and the workflow progresses normally to
completion.

Thanks,
Dave

Mini Francis

unread,
Sep 3, 2008, 7:33:08 AM9/3/08
to ATG_Tech
Hi,


I can access the ca-sample-import-code.jar that is available on the
ATG site. I modified the standard workflow for my work as
workflow-- checkin project's workspace--deploy-- deployNow--approveand
deploy project into all targets--compleet project--send
workflowcomplete message with status complete
but in advances the workflow to the next state
method ,advanceWorkflow(Process pProcess), it is throwing exceptions
as follows::.


[WorkflowProcessManager] Error executing action
approveAndDeployProjectForAllTargets[] on process instance 3600002;
reverting the process instance to its original state
atg.process.ProcessException: Cannot deploy because no target sites
have been defined.
at
atg.epub.workflow.process.action.ApproveAndDeployProjectForAllTargets.executeAction(ApproveAndDeployProjectForAllTargets.java:
72)
at atg.process.action.ActionImpl.execute(ActionImpl.java:397)
at
atg.process.ProcessManagerService.executeAction(ProcessManagerService.java:
13591)
at
atg.process.ProcessManagerService.takeIndividualTransition(ProcessManagerService.java:
12999)
at
atg.process.ProcessManagerService.receiveIndividualEventMessage(ProcessManagerService.java:
11475)
atg.workflow.WorkflowMessageSource.fireTaskOutcomeMessage(WorkflowMessageSource.java:
134)
at
atg.workflow.WorkflowViewImpl.fireTaskOutcome(WorkflowViewImpl.java:
1065)
at
com.cnp.ecommerce.offerCreation.ProgramaticImportService.advanceWorkflow(ProgramaticImportService.java:
347)
at
com.cnp.ecommerce.offerCreation.ProgramaticImportService.executeImport(ProgramaticImportService.java:
306)


Do I need to configure deploymentTopology.xml????Where should we
define the target sites for my programatic deployment process to
production and staging??
Hope someone can help me.

Thanks
Mini
> ...
>
> read more »

Belmont, Adam

unread,
Sep 3, 2008, 4:07:02 PM9/3/08
to atg_...@googlegroups.com
Did you already go into the CA admin console and setup your target servers?
If there are no targets defined the workflow throws that error.

If your ca admin console looks like this image, you have no targets defined.


-- Adam

-----Original Message-----
From: atg_...@googlegroups.com [mailto:atg_...@googlegroups.com] On Behalf
Of Mini Francis
Sent: Wednesday, September 03, 2008 7:33 AM
To: ATG_Tech
Subject: [atg_tech:1696] Re: Deploy the project in Staging and
productionprogramatically


Hi,

Thanks
Mini

atg.workflow.WorkflowMessageSource.fireStartWorkflowMessage(WorkflowMessageS
ource.java:
> > 164)
>
> > at
> > atg.workflow.WorkflowViewImpl.startWorkflow(WorkflowViewImpl.java:58
> > 3)
>
> > at
> >
atg.epub.project.ProcessHomeMethods.initializeProcess(ProcessHomeMethods.jav
a:
> > 368)
>
> > at
> >
atg.epub.project.ProcessHomeMethods.initializeProcessWithGlobalWorkflow(Proc
essHomeMethods.java:
> > 307)
>
> > at
> >
atg.epub.project._ProcessHome_Impl.initializeProcessWithGlobalWorkflow(_Proc
essHome_Impl.java:
> > 39)
>
> > at
> >
atg.epub.project.ProcessHomeMethods.createProcessForImport(ProcessHomeMethod
s.java:
> > 154)
>
> > at
> >
atg.epub.project._ProcessHome_Impl.createProcessForImport(_ProcessHome_Impl.
java:
> > 18)
>
> > at
> >
com.cnp.ecommerce.offerCreation.ProgramaticImportService.executeImport(Progr
amaticImportService.java:
> > 271)
>
> > at
> >
com.cnp.ecommerce.offerCreation.RenewalKeysProcessor.doScheduledTask(Renewal
KeysProcessor.java:
> > 67)
>
> > at
> >
atg.service.scheduler.SingletonSchedulableService.performScheduledTask(Singl
etonSchedulableService.java:

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"ATG_Tech" group.
To post to this group, send email to atg_...@googlegroups.com To
unsubscribe from this group, send email to
atg_tech-u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/atg_tech?hl=en
-~----------~----~----~----~------~----~------~--~---

noTargets.png

Mini Francis

unread,
Sep 4, 2008, 9:17:59 AM9/4/08
to ATG_Tech
Hi,

I need to deploy it through java not through the CA admin and setup
target servers.
Do you have any idea??

Mini
> ...
>
> read more »
>
> noTargets.png
> 81KViewDownload
>
> smime.p7s
> 4KViewDownload

Gordon Cooke

unread,
Sep 4, 2008, 10:08:37 AM9/4/08
to atg_...@googlegroups.com
You will still need to go to the admin UI and set up your targets.
Does not matter if you are using the UI or accessing the deployment
APIs. Underneath it all it still uses the worksflows and without a
target to deploy to will break. Do you have target servers set up?

Gordon
>> workflow-- checkin project's workspace--deploy-- deployNow--
>> approveand

Mini Francis

unread,
Sep 4, 2008, 10:27:06 AM9/4/08
to ATG_Tech
Yes, the target server is up and running with publishingAgent. I am
getting error as follows

] Error executing action
approveAndDeployProjectForAllTargets[}
atg.process.ProcessException: Cannot deploy because no target sites
have been defined.


Thanks Mini
> ...
>
> read more »

Gordon Cooke

unread,
Sep 4, 2008, 11:24:19 AM9/4/08
to atg_...@googlegroups.com
So either:
1) you have not updated your workflow to include the created targets
(which you do need to do after creating them in the AdminUI)
or
2) the targets have not been saved and "made live" so are not yet
visible to the application.

Look at the workflow in the ACC and towards the end of that workflow
(far right) you should see the targets in the workflow actions. If
there is any red those errors must be corrected before running a
deployment. If there are no errors here go back to the admin UI and
verify all of the targets are visible and enabled.

Gordon

Mini Francis

unread,
Sep 5, 2008, 10:16:00 AM9/5/08
to ATG_Tech
Thanks For the reply.
In my ACC there is no error in workflow.
Can we create a targetsite thr java before calling the
approveAndDeployProjectForAllTargets?
This is the main error I am getting
Error executing action approveAndDeployProjectForAllTargets[] on
process instance 200002; reverting the process instance to its
original state
atg.process.ProcessException: Cannot deploy because no target sites
have been defined.

This is the sample code from ATG's site I hav copied.
//-------------------------------------
/**
* This method advances the workflow to the next state. If using an
unaltered copy of the import-late
* or import-early workflows, then the taskOutcomeId property should
not need to be changed
* (default is '4.1.1'). If you are using a different workflow or an
altered version of the import-xxxx
* workflows, then the taskOutcomeId can be found in the wdl file
for the respective workflow.
*
* @param pProcess the atg.epub.project.Process object (the project)
*/
protected void advanceWorkflow(Process pProcess) throws
WorkflowException, ActionException
{
RepositoryItem processWorkflow =
pProcess.getProject().getWorkflow();
String workflowProcessName =
processWorkflow.getPropertyValue("processName").toString();
String subjectId = pProcess.getId();

try {
// an alternative would be to use the global workflow view at
WorkflowView wv =
getWorkflowManager().getWorkflowView(ThreadSecurityManager.currentUser());

wv.fireTaskOutcome(workflowProcessName,
WorkflowConstants.DEFAULT_WORKFLOW_SEGMENT,
subjectId,
getTaskOutcomeId(),
ActionConstants.ERROR_RESPONSE_DEFAULT);

} catch (MissingWorkflowDescriptionException e) {
throw e;
} catch (ActorAccessException e) {
throw e;
} catch (ActionException e) {
throw e;
} catch (UnsupportedOperationException e) {
throw e;
}
}
From this line I am getting exception
wv.fireTaskOutcome(workflowProcessName,
WorkflowConstants.DEFAULT_WORKFLOW_SEGMENT,
subjectId,
getTaskOutcomeId(),
ActionConstants.ERROR_RESPONSE_DEFAULT);


I tried with,

TransportDef transportDef=
getDeploymentServer().getTopologyManager().createTransport();
transportDef.setRmiURI("rmi://172.31.51.241:8860/atg/epub/
AgentTransport");
AgentDef
agetDef=getDeploymentServer().getTopologyManager().createAgent();
agetDef.setDisplayName("NewAgent");
agetDef.setTransport(transportDef);
agetDef.setPrincipalAssets(principalAssets);
Set<AgentDef> agents=new HashSet<AgentDef>();
agents.add(agetDef);
TargetDef
targetDef=getDeploymentServer().getTopologyManager().createTarget();
targetDef.setDestinations(destinations);
targetDef.setAgents(agents);
targetDef.setDisplayName("NewSite");
List<TargetDef> targets=new ArrayList<TargetDef>();
targets.add(targetDef);
TopologyDef
topologyDef=getDeploymentServer().getTopologyManager().createTopology();
topologyDef.setTargets(targets);

But it's not working...
I am getting same exception. can you help me

Mini
> ...
>
> read more »

Emmanuel Parasirakis

unread,
Sep 5, 2008, 4:39:13 PM9/5/08
to atg_...@googlegroups.com
It looks like your targets are not live. In the admin console in the Configuration sections' main screen, there will be be button that says "Make Changes Live". If you see that button, then click it.
Reply all
Reply to author
Forward
0 new messages