campfire-digital-services / liferay-webcontent-workflow-portlet

Portlet to allow assignment of different Liferay workflows to individual Web Content Structures
1 stars 3 forks source link

incorrect type in structureId since liferay change to character varying 75 #7

Open marnau77 opened 8 years ago

marnau77 commented 8 years ago

In liferay 6.2EE when you acces de portlet view selection workflow of structures the structures with structuresid with no long type can't change the workflow. I think in the file view_wcwf.jspf the structureId must be change

long structureId = 0; if(structure != null) structureId = GetterUtil.getLong(structure.getStructureKey()); %>

cwho commented 8 years ago

Thanks marnau77,

This is a known limitation. We realized structure IDs could be non-numeric post-6.2 but did not switch over to using the Structure Keys because we wanted to ensure existing portlet config on Liferay 6.1 was supported seamlessly when migrating over to Liferay 6.2.

If the structure does not have a numeric structure ID, the portlet interface will indicate it is not supported, and will use the workflow assigned to "Basic Web Content".

I understand the non-numeric structure ID structures are mainly the ones pre-imported from Liferay Sample Data, custom created structures usually have a numeric structure ID.

Please let me know if this is a major blocking issue for your usage of this portlet.

Cheers, Chun

marnau77 commented 8 years ago

Thanks cwho, You are right, but the problem is when you use the resource importer to add structures and templates to the global scope or add to a site. This web plugin don't create numeric structures ID so we have problems. Thanks

cwho commented 8 years ago

Ah yes, I can see how that is an issue.

I will enhance the portlet to take a portlet-ext.properties entry which will allow the portlet to use structure keys instead of structure ids (the default). Given our existing load, I would expect this to be available on Thursday (11 Feb). Let me know if this is an acceptable timeframe.

Cheers, Chun

marnau77 commented 8 years ago

It's perfect

cwho commented 8 years ago

Hi marnau77,

I have updated the 6.2.x branch of this portlet with a version that will use the DDMStructure ID (instead of the JournalStructure ID), if you place the following property in your portal-ext.properties: webcontent-workflow-portlet.isUseDDMStructureId=true

cwho commented 8 years ago

webcontent-workflow-portlet-LP6.2-1.0.2.2.war.zip

Attached ZIP of the prebuilt WAR for the new version..

marnau77 commented 8 years ago

Thank cwho, I will deploy and try it.

cwho commented 8 years ago

any updates?

marnau77 commented 8 years ago

It seems correct but when I reboot my server the configurations is lost. I describe the steps 1 Deploy the portlet 2 Create a structure and template by a hook resource importer to the global scope 3 Create a Site 4 Go to the portlet configuration and set the structure from the global scope a specific workflow 5 Create a Journal in this scope and the workflow is triggered 6 Reboot the server 7 When I go to see the configuration over that structure the setting is not correct.

Thanks in advance