protected void execute() throws WorkflowException
{
setFunctionStatus(STATUS_NOK);
try
{
final ContentFactory factory = new ContentFactory(contentTypeDefinitionVO, contentValues, contentVersionValues, getPrincipal(), languageVO);
ContentVO newContentVO = null;
if(getContentVO() == null)
{
parentContentVO = (ContentVO) getParameter(FOLDER_PARAMETER);
newContentVO = factory.create(parentContentVO, categories, getDatabase());
}
else
{
newContentVO = factory.update(getContentVO(), categories, getDatabase());
}
if(newContentVO != null)
{
setPropertySetString(ContentProvider.CONTENT_ID_PROPERTYSET_KEY, newContentVO.getContentId().toString());
}