2 Replies Latest reply on Aug 28, 2012 1:42 AM by Ruytero

    custom process step

    Ruytero Level 1



      I'm trying to create a proces flow that uses a custom process step and I'm facing some problems:


      "Only a type can be imported. org.apache.felix.scr.annotations.Component resolves to a package StoreFile.java /ws08-idatest_4502_00cc1fe5-0060-4282-9490-85140078d3f5/WebContent/apps/idamf/src/Store/s rc/main/java/com/idamf/io/Store line 4"


      Component cannot be resolved to a type StoreFile.java /ws08-idatest_4502_00cc1fe5-0060-4282-9490-85140078d3f5/WebContent/apps/idamf/src/Store/s rc/main/java/com/idamf/io/Store line 25" "



      • When I implement the WotkflowProcess, I cannot seem to get my code to work in a 'Process Step' step in my workflow. The class created, does not show up in the list of selectable processes. When I implement the JavaProcessExt, it does show up in the list.



      • When I create a dialog for my custom process step, I am not able to edit it in my workflow. So I am not able to set the arguments for my process step




      My WorkflowProcess implementation in StoreFile.java, just some very simple code outputting some lines to the log.


      * @author

          @Property(name=Constants.SERVICE_DESCRIPTION, value="A sample process step to try and store a file to file system"),
          @Property(name=Constants.SERVICE_VENDOR, value="IDAMF"),
          @Property(name="process.label", value="Store File")


      public class StoreFile implements WorkflowProcess {

        protected final Logger log = LoggerFactory.getLogger(StoreFile.class);

          public void execute(WorkItem arg0, WorkflowSession arg1, MetaDataMap arg2)
                  throws WorkflowException {
              // TODO Auto-generated method stub
           log.info("************** EXECUTING STORE FILE ********************");



      Anybody have an idea what goes wrong?





        • 1. Re: custom process step
          Sham HC Level 7

          Please make sure that your .bnd file have two line[1].  After that right click on the .bnd file and click the "Build Bundle" under "Tool" option.Now, you should not get any error while building the bundle for a custom workflow step using your sample code.



          Import-Package: *
          Private-Package: *

          • 2. Re: custom process step
            Ruytero Level 1

            Hi Sham


            Thanks for the reply.

            I placed the @Component, @Service, ... outside the comments again.

            The bnd file looks as followed:


            #Export-Package: *

            Import-Package: *

            Private-Package: *

            # Include-Resource:

            Bundle-Name: Store

            Bundle-Description: Store

            Bundle-SymbolicName: Store

            Bundle-Version: 1.0.0-SNAPSHOT

            Bundle-Activator: com.idamf.io.Store.Activator


            This time with the 'Export-Package' in comment, before it was not in comment.

            Still get the errors when compileing and when building, screenshot is attached.