Where I can find example for workflow implementation? Actually we are not able to attach workflow definition to a Page or Component. We have created new Workflow definition for Page and Component when we open a page and go to Workflow tab it is showing "Approval Status: Undefined"
We recently upgraded from Tridion 5.3 to Tridion 2011 SP1, we have executed the step mentioned in Upgrade manual "Upgrading existing default Workflow Process
Definitions"
As per my understanding under workflow tab we should be able to select workflow definition to be followed by Page or Component
For Pages, Workflow Processes are attached to Structure Groups (you'll be able to select the Process Definition in the Workflow Tab of the Structure Group). When attached to a SG, any page that you create or edit in that SG will start the workflow for that item. Note that Structure Group's do not inherit this setting, so every SG you'll have to attach the process to.
For Components, Workflow Processes are attached to the Schema (you'll be able to select the Process Definition in the Workflow Tab of the Schema). When a Schema has a workflow, any Component that is created or edited using that schema will be put into a workflow.
Note that child Publications won't automatically have Components and Pages kick into workflow. For example, if your schemas with attached Process Definitions are at the 010 level, and your components are at the 020 level, you'll have to go to the Workflow Tab in the Publication properties of your 020 level and make sure to check "Enable Workflow Process Associations in Shared Schemas and Structure Groups".
Hope that helps!
Related
I can create custom activities with a custom activity designer using WorkItemsPresenter. Sub-activities can be drag into my custom activity. But each of sub-activities sit side by side.
Is there a way to connect those sub-activities using wire like Flowchart or StateMachine activity?
Thanks
In Visual Studio, you add a new Activity (.xaml file). Then use the toolbox to add a container (you can add sequence, flowchart, state machine) There is some basic tutorials for each on MSDN.
Then you add your custom activities from the toolbox (if you just added the custom activity, make sure that dll is referenced and that you have performed a build to see it)
We have a requirement that on a page publish, we need to:
Find a component presentation that has a component based upon a particular schema.
Extract certain field vales from that component and store them in a custom database table that's available to our .NET application (on the Content Delivery side).
I think this is a good candidate for either a Deployer extension or a Storage extension - but I'm a little unclear which and why having never written either?
I've ruled out the Event System as this kind of code would be located on the CM, which seems like the wrong "side" to me - my focus is on extending what happens on the CD-side after a page is published.
Read a few articles on Tridion World (this, this, this and this) and I think a storage extension would be the better choice?
Mihai's article seems to be very close to what we need, where he uses a new item type mapping:
<ItemTypes defaultStorageId="brokerdb" cached="true">
<Item typeMapping="PublishAction" cached="false" storageId="searchdb" /></ItemTypes>
But how does Tridion "know" to use this new item type when content is published, (its not one of the defined TYPE_NAMEs, which is kind of the point)?
I should clarify I'm a .NET/C# dev not a Java dev so this is probably really obvious to Java people - apologies if it is!
Cheers
Tridion will not know by default how to deploy your new entity. My advise is to create a Deployer Module (your links should give you enough information about how you can do that) that executes in post-processing phase (of the deployment process), that processes all components from the deployment/transport package, extracts the needed information and uses a custom Storage Extension to store the needed information.
Be careful: you need to set-up in config your new type but you also need to use it yourself from that Deployer Module.
Hope this helps.
Needed to understand your inputs on: Is there a way in Tridion 2011 to Publish or Unpublish components/pages/templates in a custom resolver code. I understand we can play with the list of resolved items. (By giving a CP,etc). But is there a way to push an item in the publishing Q from a custom resolver code.
You can add or remove any number of items to be part of the existing package / transaction.
If you want it to be part of a new entry in the Publishing Queue instead, the event system seems more appropriate than a resolver. But the items you are publishing automatically won't show up in the "Items to Publish" screen if you Publish them separately, so you need to decide if that's a good thing or not.
Peter (and Nuno) have really answered your question in the best way. You should use a resolver to add the Pages or Component Presentations to the package rather than making new publish transactions. However you can publish items using the core service, so there is no reason you could not call the core service from a resolver and initiate your new publish actions that way.
However it does not sound like a good idea, perhaps you can update you question to explain why you need to do this.
I used to use the PublishEngine object in my templates to add items to the Publish Queue (see http://www.tridiondeveloper.com/the-story-of-sdl-tridion-2011-custom-resolver-and-the-allowwriteoperationsintemplates-attribute), but custom resolvers and other techniques are far superior.
We are iterating the components in a folder in Tridion 2011 and creating our custom XML to be used on CDS on the basis of the publishing status of component. I am giving below example to make you understand the problem.
Supppose we have 10 components in a folder which are all published and we publish our XML then the XML gets generated for 10 items.
Now we make change in one of the component and don't publish it.
After modification of component, we publish the XML again. then the XML get updated for the modified component also. So it creates the difference between the published version of that component and the that is in our XML.
So I want to publish the custom XML in such a way that it should only contain that data which is in sync with published version of component.
So you want to:
determine the XML of the Component that was last published
determine the changes between that XML and the current XML of the Component
only publish the changes
Tridion doesn't keep track of the version that was published (on the Content Manager at least). So the closest you can do is find out when the Component was last published and retrieve the XML of that time. This question is a great starting point for more information on that approach. Based on that XML you can then do steps 2 and 3 above.
Alternatively you can keep a snapshot of the XML that you published "somewhere" (for example in Application Data) when you're rendering the Component. Then when the Component gets published next time, you can retrieve that XML and do steps 2 and 3 above.
Note that with any of those solutions you should really wonder if you should be implementing it to begin with. You are overriding some of Tridion's default rendering behavior and circumventing part of its architecture (a clear, explicit disconnect between Content Management and Content Delivery, with the former knowing "nothing" about the latter) and anything you do will come back to haunt you in time. In this use-case you have to wonder what will happen when the CDS and TCM get out of sync. Simply republishing the content suddenly won't be good enough anymore, since your code will be in there deciding that "nothing changed since last publish, so we'll publish nothing".
Please forgive me if I jump to conclusions, but I strongly feel this question has arisen from a lack of understanding of Tridion. Publishing in Tridion does more than just raise a flag to indicate the item is 'published', in other words ready to be shown to the outside world. I know this is how some (many) content management systems operate (which may explain why you are asking this question).
In Tridion, however, publishing means that the item is actually - physically - transferred from the content management environment to the content delivery environment. This environment always contains versions of your content that represent the state when the item was last published - simply because it was the very act of publishing that created them.
In my opinion, what you are really asking is how to rebuild this publishing functionality. This is never a good idea. Instead, you should take Bart's comment seriously and look at one of the content delivery APIs that Tridion has on offer (the broker API or the OData web service). Optionally you might want to look into DD4T, which is built on top of the broker and exposes the full Tridion data model.
Then your solution is to
Write an event handler on the Publish Transaction Save event
Which saves the publish info (version data) to Application Data of the published Component
I'm mentioning the Publish Transaction Save event because from there you can ensure that the publish info is only saved when the transaction is successfull.
Also be aware that this publish info can go out of sync when the event handler fails to execute, and you might loose all of the application data when moving to another environment.
So when this information is absolutely crucial I would save it to a separate database, and not to Application Data.
I would like my users to be able to create and edit their own content. However, after they create new content, and after they edit it, I would like to have a way to accept those changes. Meanwhile, before changes are accepted, the previous version of the node will remain visible. Can this be accomplished with workbench, or is there another route I should take?
You can make the node content type unpublished by default from [admin/structure/types/manage/article] where "article" is the node content type...and then you can use "views" module to display all un published node... then you can manage the unpublished nodes and make theme published...
then
you can use rules module to make the node unpublish after its edited by the user
Take a look at the Maestro module. It is a way to implement workflows into your site.
From the project page:
The Maestro module is a workflow engine/solution that will facilitate
simple and complex business process automation. The first release of
this module will be for Drupal v7.
Maestro has a number of components that include the workflow engine
and the visual workflow editor. The workflow editor is used to define
the workflow, creating a workflow template. The workflow engine runs
in the backgound and executes the workflow tasks, testing the tasks
execution results and branch the workflow if required. The workflow
engine will run every x seconds and execute all tasks that are in the
queue which have not yet completed. Once they execute and return a
success status, the engine will archive them and step the workflow
forward. Both these components have been developed to support any
number of different task types. New task types can be developed and
added much like the Drupal CCK module can support new field types.
I have installed and configure the "Maestro" Module in Drupal Commons.
actually in Maestro Module every time we should Load the Workflow and it will go through step by step.
Like
Admin: Publishing Workflow Load
User1: Assigend to add new Content.
User2: Review Content
User3: Publish Content.
Here I want to Skip the Admin Step Is it possible? When user create new content type it is automatically go for review.