Hello
Currently I'm working on forms-centric workflows. I'm using the assign task component and I need to add some custom values into the custom email templates. As per documentation (https://docs.adobe.com/content/help/en/experience-manager-65/forms/publish-process-aem-forms/use-met... I should be able to write my own OSGi service which prepares the metadata map.
Unfortunately I'm not able to successfully get the OSGi service listed in the field Assign Task --> Advanced --> Custom Metadata. It seems that the above linked documentation is incomplete (e.g. see point 4).
Was anyone able to create such a OSGi service and get it listed for selection? If so, is there a working example available?
Kind regards
Richard
Solved! Go to Solution.
Views
Replies
Total Likes
I will send you a sample code soon
i have it somewhere on my laptop
Views
Replies
Total Likes
Views
Replies
Total Likes
Thank you very much!
Can you also provide the necessary maven dependency? When I implement the mentioned interface I have to override
public Map<String, String> getUserMetadata(WorkItem workItem, WorkflowSession workflowSession, MetaDataMap metadataMap) {
}
I'm working with AEM Forms 6.5 SP6.
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
I got it working but I had to adapt the code a bit:
import com.adobe.fd.workspace.service.external.WorkitemUserMetadataService;
import com.adobe.granite.workflow.WorkflowSession;
import com.adobe.granite.workflow.exec.WorkItem;
import com.adobe.granite.workflow.metadata.MetaDataMap;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Properties;
import org.apache.felix.scr.annotations.Property;
import org.apache.felix.scr.annotations.Service;
import org.osgi.framework.Constants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.HashMap;
import java.util.Map;
@Component
@Service
@Properties({
@property(name = Constants.SERVICE_DESCRIPTION, value = "A sample implementation of a user metadata service."),
@property(name = WorkitemUserMetadataService.SERVICE_PROPERTY_LABEL, value = "Default User Metadata Service")})
public class WorkItemUserServiceImpl implements WorkitemUserMetadataService {
private static final Logger log = LoggerFactory.getLogger(WorkItemUserServiceImpl.class);
@Override
public Map<String, String> getUserMetadata(WorkItem workItem, WorkflowSession workflowSession, MetaDataMap metadataMap) {
HashMap<String, String> customMetadataMap = new HashMap<String, String>();
return customMetadataMap;
}
}
Views
Replies
Total Likes
Let me know If you have questions on the link I sent you
we will update the other link as well
thanks
Views
Replies
Total Likes
Views
Replies
Total Likes
Yes the versions are confusing. We are going to start naming the versions which are in sync with AEM forms release version
sorry for the confusion
Views
Likes
Replies