// Check if the publish should be scheduled or performed immediatly if (typeof pubwf_scheduledPublishDate != 'undefined' && pubwf_scheduledPublishDate != null) { execution.setVariable("schedule", true); } else { execution.setVariable("schedule", false); } ${schedule} var publishEventAction = actions.create("pub_publishEvent"); publishEventAction.executeAsynchronously(pubwf_publishingEvent); ${iso8601PublishDate}