Quản lý cấu hình web - part 18 pdf

10 238 0
Quản lý cấu hình web - part 18 pdf

Đang tải... (xem toàn văn)

Thông tin tài liệu

Web Content Production with Web Forms [ 152 ] 3. The uploaded le will be shown under the Browse Files folder. Click on the Edit action for the EditNews.xml le as shown in the following screenshot: 4. Opening this will show a link: To edit this le using a Web Form, click here. 5. Clicking on this link will show a next screen in which you can select a web form to be associated with the uploaded XML le. Click on OK. Download from Wow! eBook <www.wowebook.com> Chapter 4 [ 153 ] 6. You will see the news web form. You can ll the content for the news web form and select Next. The summary page will be open, which will display details about the web form and content. You can preview content (to preview content, note that the virtual server should be running). Also, you can submit the content to the staging server (you will learn in detail about the staging server in later chapters). Click on Finish. Static and dynamic include of content This section is in reference to the Advance schema attributes section of the web form. In the previous section, we discussed only the syntax to be used for include. Consider a scenario where you want to populate a dynamic combo box. Let's create a web form to input values for populating the combo box. Create the newstype.xsd and newsType.ftl les and populate these with the downloaded code from the Packt website. Download the complete code samples from the Packt website. Download from Wow! eBook <www.wowebook.com> Web Content Production with Web Forms [ 154 ] 1. To create and congure web forms to the Cignex web project, see the section Creating web forms. Create web content using the newsType web form. Click on the Create Content action. 2. On clicking Create Content, add values as shown in the following screenshot. 3. Click on Next. Add values as shown in the next screenshot: Download from Wow! eBook <www.wowebook.com> Chapter 4 [ 155 ] Do not proceed to the subsequent sections without rst creating web content using the news Type web form. Please specify the output path pattern as shown in the earlier screenshots. Provide common/inc/${name}.xml as the output path pattern for XSD and ${name}.jsp for template. Also, keep your virtual server running. 4. Edit news.xsd and add the following line of code before dening a root element. We are including one JSP into the other XSD. <xs:include schemaLocation="/common/inc/NewsType.jsp" /> 5. Add the following block of code anywhere after the root element is dened: <xs:element name="ContentType" type="trn:newsType" > <xs:annotation> <xs:appinfo> <alf:appearance>minimal</alf:appearance> </xs:appinfo> </xs:annotation> </xs:element> Download from Wow! eBook <www.wowebook.com> Web Content Production with Web Forms [ 156 ] 6. Now create content using the news web form. You will see the combo box populated with the values you added while creating content for the NewsType web form. Web publishing dashlets Alfresco provides two new dashboard components, My Web Forms and My Web Files, which put the needed set of publishing operations at the ngertips of any knowledge worker, helping them to access and speed through the publishing process while masking the underlying process and structure of the Web Content Management system. Follow the next steps to congure dashlets: 1. In the Alfresco Explorer user interface, the My Alfresco area is known as the Dashboard. 2. Click on the My Alfresco menu link in the toolbar to view your personal dashboard. 3. To start conguring your dashboard, click on the Congure icon given in the My Alfresco dashboard. The Congure Dashboard Wizard will open up a screen, allowing you to select the dashboard layout and dashlets. Select the style of layout you wish to have for your dashboard. Click on the Next button to move to the next step, selecting the dashboard components. Download from Wow! eBook <www.wowebook.com> Chapter 4 [ 157 ] 4. Select the following components: ° My Tasks To Do: Lists all the tasks assigned to you that are pending ° My Web Forms: Lists all the web forms available to the web project and can create content directly from here ° My Web Files: Lists all the web forms available to the web project and can edit content directly from here 5. Click on the Next or Finish button to save your selection. The selection is effective immediately, and you can see the dashboard with your selections, as shown in the next screenshot: Download from Wow! eBook <www.wowebook.com> Web Content Production with Web Forms [ 158 ] Summary In this chapter, we have learned how Alfresco WCM makes it simpler to manage content through a user-friendly and technology-neutral (as much as possible) interface: • Alfresco web forms enable users to create XML content from a simple browser-based form. • There are three types of renditions available: FTL, XSLT, and XSL-FO. With renditions, you can manage the content in various formats. • A dynamic website can be developed easily with the web forms. • Web forms can associate with specic/multiple projects. • Web content can be searched using a query. • Dashlets are provided to access easily and speed through the publishing process. In the next chapter, we are going to learn about WCM Workows. Workows can be congured for any web form. Through workow, web content can be submitted to the Staging Sandbox. From the Staging Sandbox it can deployed to servers. Download from Wow! eBook <www.wowebook.com> WCM Workows Workow is an automation of a business process, during which documents are passed from one participant to another for action, according to a set of procedural rules. Every content management system implementation will have workow requirements. Workow provides ownership and control on the content and processes. Alfresco web project uses workows to support any set of changes, either automated or user-driven steps, in a business process before nal commit to the Staging Sandbox. WCM Workows can be congured for each form or for any arbitrary set of non-form assets. In this chapter, you will understand the basic out-of- the-box workow capabilities of the Alfresco WCM and the ways to extend it as per your business requirements. By the end of this chapter you will have seen the: • Advantages of workow • Introduction to the workow process • Out-of-the-box workows • Associating workows to web forms • Associating workows to web projects • Dynamically changing workow for each snapshot submission • Process of dening and using your custom workow • Use of expiration date Download from Wow! eBook <www.wowebook.com> WCM Workows [ 160 ] Why workows are required Consider that we want to develop any website; so our rst step will be to create web content, and the next step will be to get the approval of the reviewers in order to publish content onto live servers. We would also like to set up a test server so that one can preview the changes and nally the content can be pushed to the staging servers and then live servers. At each stage it seems we require a set of processes to be followed to get our approval completed and go to the next stage. This can be achieved using WCM Workows. WCM Workows are required to follow the user approval process for submitted content, to publish them on the Staging Sandbox. You must deal with the approval of content items that are routed through workow and the submission of the items to staging servers and then the live server. Submitted changes are routed via workow (assume workow is congured for the web project) for one or multiple users to review and approve, either serially or in parallel, using Alfresco's out-of-the-box workow (or any custom-built WCM Workow). On approval of the item, content is submitted to the Staging Sandbox. Even if we don't congure workow for any item, the submission takes place in the background using workow and each content item remains in the Modied Items list until its submission is complete. To verify this you can see a workow task in the My Task To Do dashlet of the content reviewer for a fraction of a second. Refresh the page as necessary, to see if the workow task has been removed from the My Task To Do dashlet and that the Modied Items list of the user's sandbox is empty. The additional advantage you get from workow is that you can congure the launch date and expiration date when promoting content to staging. Prior to this launch date, users can preview the changes and cancel the pending launch if required. In the Staging box, it will be reected in Content Awaiting Launch. Upon expiration, users can see that item as a task in their My Tasks To Do dashlet to decide whether the content should be updated or removed from the site. This content expiration also works in conjunction with Alfresco's new Links Validation service, ensuring that the site's link integrity is incrementally tested against the new pending update. In this manner, content cannot only be regularly refreshed through an automated, task-driven review process, but can also be tested upon change so that no errors are accidentally introduced in the form of broken links. Another advantage is that once the content is approved, a snapshot is taken to the Staging box. For each submission a snapshot is maintained, which gives the advantage to roll back to any submission at any point of time. Download from Wow! eBook <www.wowebook.com> Chapter 5 [ 161 ] In the previous chapter you learned how to create content. At this point, your web project is populated with content items, some imported and some created. Now you want to submit the content to the Staging box. You must congure a workow process to get the approval, so the content is now routed through workow to content reviewers for approval. Once you have approved all of your content, modied items are deployed to the staging server. Introduction to the workow The WCM Workow uses the JBoss Business Process Management (jBPM) engine in its core. jBPM is an open source, standalone workow engine. It can run in any servlet container—it doesn't require the JBoss Application Server. The jBPM engine is responsible for managing deployed processes, instantiating and executing processes, persisting process state and metadata to a relational database (via Hibernate), and tracking task assignment and task lists. JBoss jBPM is a exible, extensible workow management system with an intuitive process language to express business processes graphically in terms of tasks, wait states for asynchronous communication, timers, and automated actions. With jBPM, the Alfresco platform is extended to support complex, task-oriented processes. jBPM is built on the idea that any process can be described as a graph or a set of connected nodes. jBPM maintains a list of tasks assigned to each participant. How users interact with the task list is up to each application. In Alfresco, a dashlet displays a to-do list for the currently logged in user. As users complete their tasks the tasks are removed from the to-do list. Download from Wow! eBook <www.wowebook.com> . downloaded code from the Packt website. Download the complete code samples from the Packt website. Download from Wow! eBook <www.wowebook.com> Web Content Production with Web Forms [ 154 ] 1. To. Forms [ 154 ] 1. To create and congure web forms to the Cignex web project, see the section Creating web forms. Create web content using the newsType web form. Click on the Create Content action. 2 workow • Introduction to the workow process • Out-of-the-box workows • Associating workows to web forms • Associating workows to web projects • Dynamically changing workow for each

Ngày đăng: 05/07/2014, 20:21

Tài liệu cùng người dùng

Tài liệu liên quan