How to using workflow to save data in other place?

Author Message

Quynh Nguyen

Thursday 12 February 2009 5:56:46 am

I'm trying to use ezPublish with other system. But for interactive data between two systems, I think the workflow/event can be used to solve my issue. Let me explain here:

- When contributor compose a draft version and it will be waited for approving from moderator.
- When moderator check and approve the content object, it will be publish to the front-site.
- I will insert another workflow before publishing the content. This event will use the data of object and save to the other system. And update the information of object had been created in another system to an added field (for example: id of the record in the other system) of the object in ezpublish system. Then saving object information and publish it in ezpublish.

Am I right to do this way?

I want to create one object in two different systems and the id of object in other system will be save in a field of object in ezPublish system. That's all what I need. If my above idea is not right, please give me some comment or help. If there are some relative project/contribs similar or can help me a little to write my own, please give me the reference information.

Thank you very much!

Quynh Nguyen

Thursday 12 February 2009 6:08:52 am

Or another idea:

After the content object is published. Is there any way to add a workflow/event to publish it in other system, and then update the information of new created object in other system to an added field in object on ezPublish system?

Thanks so much!

Kristof Coomans

Monday 16 February 2009 11:58:36 pm

Hi

Indeed, a workflow at the publish / after trigger would work. There are some different options to relate the objects:

- store the external ID in the remote_id attribute of the content object in eZ Publish
- store the external ID in a separate content object attribute of the object in eZ Publish

- store the remote id of the eZ Publish content object with the object in the external system

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 18:27:13
Script start
Timing: Jan 18 2025 18:27:13
Module start 'layout'
Timing: Jan 18 2025 18:27:13
Module start 'content'
Timing: Jan 18 2025 18:27:13
Module end 'content'
Timing: Jan 18 2025 18:27:13
Script end

Main resources:

Total runtime0.9176 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 589.1797152.6406
Module start 'layout' 0.00560.0027 741.820339.4922
Module start 'content' 0.00830.9076 781.3125533.9609
Module end 'content' 0.91590.0016 1,315.273412.1250
Script end 0.9175  1,327.3984 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.3645160.0002
Check MTime0.00150.1595160.0001
Mysql Total
Database connection0.00080.084610.0008
Mysqli_queries0.868094.5947570.0152
Looping result0.00060.0639550.0000
Template Total0.841591.720.4207
Template load0.00220.240720.0011
Template processing0.839391.467620.4196
Template load and register function0.00020.020810.0002
states
state_id_array0.04194.562210.0419
state_identifier_array0.00160.170820.0008
Override
Cache load0.00190.2025210.0001
Sytem overhead
Fetch class attribute can translate value0.00080.088020.0004
Fetch class attribute name0.00090.098940.0002
XML
Image XML parsing0.00060.067520.0003
class_abstraction
Instantiating content class attribute0.00000.001040.0000
General
dbfile0.00100.1109160.0001
String conversion0.00000.000640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 13
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs