1. Trang chủ
  2. » Công Nghệ Thông Tin

Quản lý cấu hình web - part 23 pptx

10 299 0

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

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 10
Dung lượng 5,83 MB

Nội dung

Download from Wow! eBook <www.wowebook.com> Dynamic Deployment and Customizations The dynamic model feature enables dynamic customization of models without requiring a restart of the Alfresco server, and is also applicable to a multi- tenant environment. This also includes dynamic reloading of the web client UI customizations. Customizations of workows can be done easily. By the end of this chapter you will have learned: • The advantages of workow • How to enable dynamic customization of workow without requiring a restart of the Alfresco server • The process of customizing an existing workow • How to remove workow for a specic staging submission • How to congure a ZERO workow • How to implement workow viewer to see the pending list of workows Dynamic deployment You are able to dynamically deploy workow in Alfresco WCM by using workow types, workow denitions, web client congurations, and property les. Since version 3.0, Alfresco supports dynamic deploy of models, workows, messages, and web-client conguration changes to facilitate dynamic customization without requiring a restart of the Alfresco server. Let's discuss how to dynamically deploy models, workows, messages, and web-client changes. Download from Wow! eBook <www.wowebook.com> Dynamic Deployment and Customizations [ 204 ] The following are the advantages of dynamic deployment: • There is no need to restart the Alfresco server every time you make changes to the les. • Both the content as well as the les are stored in the repository. It is easier to maintain and move content along with the les. • You can activate and inactivate the dynamic models by keeping the model XML le in the repository. • You can deploy and undeploy the workow denitions as and when required. • In a multi-tenant setup, the les that are dened in the <extension> folder are available to all tenants. If you would like to customize workow for a specic tenant only, then a dynamic deployment is the best choice. Dynamic models Dynamic models are nothing but XML-based model les. Creating a dynamic custom model is the same as creating a regular custom model. For this example, create a custom content type that has two properties. Create a le named dynamicWCMWorkflowModel on your personal computer with the downloaded content. Download the complete code sample from Packt's website. Deploying a model le The Task Model can also be dynamically deployed without restarting the server. This can be achieved by two ways: • Uploading or creating the model le in the new 'Models' space (Company Home | Data Dictionary | Models). • Using pre-registered URLs provided by the Alfresco Repository Admin Console. Download from Wow! eBook <www.wowebook.com> Chapter 6 [ 205 ] First approach Dynamic workow models are stored in the new 'Models' space (Company Home | Data Dictionary | Models). Upload a custom XML model le, dynamicWCMWorkflowModel, to the 'Models' space. By default, the model will not be active unless the Model Active checkbox is selected during the upload. To activate a previously inactive model, select View Details and then select the Modify properties icon. In the Modify Content Properties page, select the Model Active checkbox. To deactivate a model, select View Details and then select the Modify properties icon. In the Modify Content Properties page, unselect the Model Active checkbox. Follow these steps to deploy a model dynamically: 1. Go to Company Home | Data Dictionary | Models. 2. In the header click on Add Content. 3. The Add Content Wizard is displayed. Upload the custom XML le. 4. In the Name textbox type dynamicWCMWorkowModel. 5. Click on OK. 6. The Modify Content Properties dialog is displayed. Check the Model Active property, as shown in the following screenshot: 7. Click on OK. Download from Wow! eBook <www.wowebook.com> Dynamic Deployment and Customizations [ 206 ] To verify the changes, log out and log in if required. Updating a custom model You can directly edit or update the XML model le. If the model is active, then it will be reloaded. If the le is checked out, then the working copy will be ignored until such a time as the le is checked in. Second approach Deployment of model les can be achieved as an administrator using the URL http://<server-name>:<port>/alfresco/faces/jsp/admin/ repoadmin-console.jsp You can use the following commands to activate or deploy the model. activate model dynamicWCMWorkflowModel.xml: This command is used to set the repository model to active and load into runtime data dictionary. deploy model alfresco/extension/dynamicWCMWorkflowModel.xml: This command uploads the model to the repository and loads it into runtime data dictionary. This will also set the repository model as active. Dynamic Resource Bundles Creating a Dynamic Resource Bundle is the same as creating a regular property le. For this example, create labels for two properties that are dened in the model le. Create a le named dynamicWCMWorkflowMessages on your personal computer with the following content: dynamic_processTask.workflow.title=Dynamic Workflow dynamic_processTask.workflow.description=Dynamic Workflow for approval Deploying a Resource Bundle The Resource Bundle can also be dynamically deployed without restarting the server. This can be achieved by two ways: • Uploading or creating the message le in the new Messages space (Company Home | Data Dictionary | Messages). • Using the Repository Admin Console provided by Alfresco. Download from Wow! eBook <www.wowebook.com> Chapter 6 [ 207 ] First approach The associated message Resource Bundles are stored in the new Messages space (Company Home | Data Dictionary | Messages). Upload the custom Resource Bundle by uploading each of the message property les (for all locales) to the Messages space. The messages will not be applied until they are explicitly reloaded or when the server is restarted. Follow these steps to create a message: 1. Go to Company Home | Data Dictionary | Messages. 2. In the header, click on Add Content. 3. The Add Content Wizard is displayed. Upload the custom property le. 4. In the Name textbox type dynamicWCMWorkowMessages.properties. 5. Click on OK. The custom conguration will not be applied until it is explicitly reloaded (refer to the following section) or the server is restarted. Download from Wow! eBook <www.wowebook.com> Dynamic Deployment and Customizations [ 208 ] Reloading the Resource Bundle If the Resource Bundle le has been added, edited, or updated, it can be dynamically reloaded by using the Alfresco Repository Admin Console via: http://<server-name>:<port>/alfresco/faces/jsp/admin/ repoadmin-console.jsp This has a single command, reload, which will cause the Resource Bundle to be reloaded. reload messages dynamicWCMWorkflowMessages Updating a Resource Bundle You can directly edit or update the Resource Bundle le. Use the reload command to reect the changes. If the le is checked out, then the working copy will be ignored until such a time as the le is checked in. Second approach They can be dynamically reloaded by using the Alfresco Repository Admin Console via: http://<server-name>:<port>/alfresco/faces/jsp/admin/ repoadmin-console.jsp . The command deploy messages <resource bundle base name> will cause the message resource to be re-registered. deploy messages alfresco/extension/dynamicWCMWorkflowMessages Dynamic workows Dynamic workows are nothing but XML-based Process Denition les. Creating a dynamic Process Denition is the same as creating a regular Process Denition le. For this example, create a custom Process Denition. Create a le named dynamicProcessDefinition on your personal computer with the downloaded content. Download the code samples from Packt publisher's book website. Deploying a Process Denition le The Process Denition can also be dynamically deployed without restarting the server. Download from Wow! eBook <www.wowebook.com> Chapter 6 [ 209 ] This can be achieved by three ways: • Uploading or creating the Process Denition le in the new Workow Denitions space (Company Home | Data Dictionary | Workow Denitions). • Using JBoss jBPM Process Designer tool. • Using pre-registered URLs provided by Alfresco workow console. First approach The Process Denitions are stored in the new Workow Denitions space (Company Home | Data Dictionary | Workow Denitions). Upload a custom XML Process Denition le to the Workow Denitions space. By default, the Process Denition will not be deployed unless the Workow Deployed checkbox is selected during the upload. Follow these steps to create a Process Denition: 1. Go to Company Home | Data Dictionary | Workow Denitions. 2. In the header click on Add Content. 3. The Add Content Wizard is displayed. Upload the custom XML le. 4. In the Name textbox type dynamicProcessdenition.xml. Click on OK. 5. Select the Workow Deployed checkbox. By default, the Process Denition will not be deployed unless the Workow Deployed checkbox is selected during the upload. 6. In the Workow Engine Id type jbpm. The completed denition is shown in the following screenshot: Download from Wow! eBook <www.wowebook.com> Dynamic Deployment and Customizations [ 210 ] 7. Click on OK. To verify the changes, log out and log in. To undeploy a Process Denition, select View Details and then select the Modify properties icon. In the Modify Content Properties page, unselect the Workow Deployed checkbox. Second approach JBoss jBPM also includes a graphical designer tool for authoring business processes. The most important feature of the graphical designer tool is that it includes support for both the tasks—that of the business analyst as well as the technical developer. This enables a smooth transition from business process modeling to the practical implementation. Follow these steps for conguring the jBPM: 1. To implement this you have to download jBPM plugins from: http://sourceforge.net/projects/jbpm/files/jBPM%20Process%20 Designer/jbpm-jpdl-designer-3.1.7 2. Once the installation is over, restart Eclipse. 3. Go to File | New | Project. Expand jBoss JBPM and select Process Project as shown in the following screenshot: Download from Wow! eBook <www.wowebook.com> Chapter 6 [ 211 ] 4. Enter the Project Name and click on Next. 5. Select the jBPM location as mentioned in the following screenshot and click on Finish: 6. Copy the Process Denition code and paste it in the src/main/jpd package. 7. The process should look like the next screenshot: 8. Deploy it as mentioned ahead. Download from Wow! eBook <www.wowebook.com> . types, workow denitions, web client congurations, and property les. Since version 3.0, Alfresco supports dynamic deploy of models, workows, messages, and web- client conguration changes. Let's discuss how to dynamically deploy models, workows, messages, and web- client changes. Download from Wow! eBook <www.wowebook.com> Dynamic Deployment and Customizations [ 204 ] The following. http://<server-name>:<port>/alfresco/faces/jsp/admin/ repoadmin-console.jsp . The command deploy messages <resource bundle base name> will cause the message resource to be re-registered. deploy

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