// read parameters from document attributes
setParameter("languages", getSourceDocument().getLanguages());
setParameter("lastmodified", getSourceDocument().getLastModified());
setParameter("resourcetype", getSourceDocument().getResourceType());
DocumentWorkflowable workflowable = new DocumentWorkflowable(getSourceDocument(),
getLogger());
resolver = (WorkflowManager) this.manager.lookup(WorkflowManager.ROLE);
if (resolver.hasWorkflow(workflowable)) {
Workflow workflow = resolver.getWorkflowSchema(workflowable);
String[] variableNames = workflow.getVariableNames();
Version latestVersion = workflowable.getLatestVersion();
Boolean isLive = null;
if (latestVersion != null) {
setParameter(STATE, latestVersion.getState());
if (Arrays.asList(variableNames).contains(ISLIVE)) {
isLive = Boolean.valueOf(latestVersion.getValue(ISLIVE));