Creating a thumbnail within a workflow process

Hi,
Within my workflow process, I want to create thumbnail images of the files/documents that have been uploaded in a page through the out of the box 'Download' component. I want to store these thumbnails on the same page(within /content/mypage). As far as I know, the logic of thumbnail creation of an uploaded files is already available in the DAM. On further probing, I got to know that the thumbnail creation is done as part of a workflow and the workflow process is 'CreateThumbnailProcess'(com.day.cq.dam.core.process.CreateThumbnailProcess). So I tried creating an instance of the CreateThumbnailProcess and calling the execute() method of this process within my workflow process. Here's a glimpse of what I did.
public void execute(WorkItem item, WorkflowSession session, MetaDataMap args) throws WorkflowException {
     CreateThumbnailProcess proc = new CreateThumbnailProcess();
     System.out.println("Test Workflow entered!!");
     proc.execute(item, session, args);
     System.out.println("Test Workflow executed. Thumbnail created!!");
But when I start my workflow, I keep getting "Test Workflow entered!!" multiple number of times on my console. I am unable to understand what's happening. Please help me. If there are any simpler alternatives to create a thumbnail, please suggest them too.
Thanks in advance
Shriram K M

Ok.
So couple of things which you can try out to check what's causing the issue.
1. If you comment
     //proc.execute(item, session, args);
  does it still causing the same issue. If yes, then problem would be somewhere in your workflow call or process execution which calling this process recurring (i can assume as not see the whole code) and, if not, then this call is only causing the issue which is pretty wierd (looking into possibility and will update you) if you do not have extended the same process as you mentioned above.
2. Not sure calling another process like this is correct way to do it because CreateThumbnailProcess automatically gets called in cq when image object created in system to create default renditions.
To answer you other question.
creating extra thumbnail apart from default renditions you should have to create workflow process as you already did but extend AbstractAssetWorkflowProcess (dont call CreateThumbnailProcess.execute() because there is default workflow process already setup.) and below code in execute method
Asset asset = getAssetFromPayload(workItem, workflowSession.getSession());
oriIs = asset.getOriginal().adaptTo(Node.class)
                            .getProperty(JcrConstants.JCR_CONTENT + "/" + JcrConstants.JCR_DATA).getBinary().getStream();
asset.addRendition(rendition, oriIs, mimetype);  //mimetype and rendition you have to create it as an object based on your requirement.
also check http://dev.day.com/docs/en/cq/current/javadoc/com/day/cq/dam/core/process/CreateThumbnailP rocess.html for more detail.
Let me know for more information.
Thanks,
Pawan

Similar Messages

  • Workflow Process Log not displayed on UI

    The client recently performed a upgrade in their development environment from 7.0 to 8.0.0.4 and everything appears to be working properly however, the Workflow Process Logs in the UI under Administration-Business Process\Workflow Process Log is not being displayed. All that we currently see are the old log files from the previous upgrade. We presently receive the WorkflowProcess Log files in the Siebsrvr\log directly but would like to know why the log files are not generating in the UI within the Workflow Process Log View. Is there some setting or parameter which needs to be set in order to get this activated again?

    Couldn't you tell what you did to fix this. That would help others that run into the same problem.
    Axel

  • Oracle Workflow - Create a condition node in the process

    Hi,
    I would like to create a workflow process which would have a condition in the middle of the process.
    Example:
    - if amount less than 10 then flow a different path
    - Else if the amount is between 11 and 20 then follow path 2
    - Else if the amount is between 21 and 30 then follow path 3
    I am not aware how this can be achieved. Is there any option like a fork?
    Request you to please help on the above.
    Regards,
    BM

    BM,
    There's a couple of ways to achieve that.
    1. Use the Standard WF, and use the 'Compare Number' function.
    2. Create a custom function, that references the amount attribute, and makes a determination on which path to take. You can then create a lookup, one for each option.
    Hope this helps you get started.

  • To create workflow process which periodically examines one database table??

    hi.......
    plz tell me the complete details that how to create workflow process which periodically examines one database table??
    also it will send email to specific address if certain condition is not fulfilled??
    help is really appreciated
    thanks nd regards
    manish singla

    Hi,
    I'd be wary of using a WAIT activity, since this will essentially have the workflow running forever in the same SQL session. If you ever need to shutdown the database, then you would have to kill the session (or do a shutdown abort), which will rollback all the Workflow transactional data.
    I would leave the polling logic to a process outside the Workflow engine. In an Applications environment, this should be a Concurrent request. If this is standalone Workflow, then schedule something using DBMS_JOB. The job should check the database, and if necessary, initiate a new workflow to send the notification.
    If the notification does not require a response, then I would be inclined to bypass Workflow competely, and have a job which calls UTL_SMTP to send an email.
    HTH,
    Matt
    Alpha review chapters from my book "Developing With Oracle Workflow" are available on my website:
    http://www.workflowfaq.com
    http://forum.workflowfaq.com

  • How to get the Asset's current step under a specific workflow process via API?

    Everyone,
    Is there a way to get the asset's current step for a specific workflow process by the WebCenter Sites API? We are showing out the asset created within the WebCenter Sites in another application via its API. We would like some actions get to be done once determined assets went into a specific step of a workflow process. Any suggestions are welcomed.
    Regards!

    Here is some information from the FDK Programmer's guide page 115:
    IMPORTANT: A valid text range can span multiple paragraphs, subcolumns, or text frames.
    It cant span multiple flows, footnotes, table cells, or text lines.
    It is possible for a document to have no text selection or insertion point at all. This can occur in
    the following circumstances:
    ● One or more graphic objects in the document are selected
    ● One or more entire table cells in the document are selected
    ● There is no selection of any type in the document
    So, I did select one or more entire table cells in the document in my first test. It's logical that the result was not like expected.
    But selecting one or more entire table cells is a crucial requirement for my plugin, is there anyway to get things straight?
    Simply put, I want to enable users to select one or more table cells in the document, and I want to get the object handles of the first cell and the last cell through Framemaker API calls. How?
    Many thanks in advance!
    Best Regards,
    Ellen N. Zhao

  • How I can auto approve pending workflow process, once month end proces

    I have created workflow process for timesheet approval.
    I want to auto approve all pending timesheet (i.e (default notification timeout is 7 days) notification send to approver, but still not approved) in Oracle workflow Process, when Month end process started
    Month end process will initiate a flag in pending timesheet header table with process started

    I am not sure if I understand your requirements completely.
    1) If your requirement is that all the pending timsheets have to be approved by month-end (not really when month-end process starts) then set the Timeout of the notification to Absolute Time of end of that month... so that by the end of the month the background engine will pick it up.
    You may design the approval notification within a Sub-process with RESULT attribute of Approve / Reject. Design a Timeout transition for the Notification Activity within the sub-process that will go to an END activity that has Approve result. Thus once the notification times out, the sub-process will complete with result APPROVED.
    2) One other way is to respond to OPEN notifications using APIs.
    WF_NOTIFICATION.SetAttrText(nid, 'RESPOND', 'APPROVED');
    WF_NOTIFICATION.Respond(nid);
    You should have queried up all OPEN notifications for Timesheet approval and do this in a loop... which could be time-consuming sometimes.
    Thanks

  • Creating a Folder Within Form or Document Library & Display the name not in the name column.

    I have created a form library that will used to create folders within that. The folder creation is done using an InfoPath Form that has been uploaded to the Form Library. When the new folder was created the name will be displayed at the Name column within
    the Form Library. I want to change that to another column like documents or suchlike.
    Can it be done using InfoPath 2010 VSTA C# or not? If their are other options available please could you try to inform me!
    Thank You,
    Chiranthaka

    Hi,     
    If you want to show the name of folder in another column, a workaround is that you can create an extra column, then create a SharePoint Designer workflow to set the value of
    this column with the name of folder.
    Here is a link about Create Workflow using SharePoint Designer and set field value for your reference:
    http://www.codeproject.com/Tips/419037/Create-Workflow-using-SharePoint-Designer
    I have seen a similar post from you in the link below:
    http://social.technet.microsoft.com/Forums/en-US/c3ff3f17-dbe2-40f9-86c5-ff7d4b663f09/creating-a-folder-within-form-or-document-library-display-the-name-not-in-the-name-column?forum=sharepointcustomizationprevious
    It's recommended that you post a single question in a single thread which will make it easier to be discussed by others.
    Best regards
    Patrick Liang
    TechNet Community Support

  • HT201320 Does my email service provider have to provide the ability for me to create an IMAP email account in order for me to create Sub-folders within Apple Mail?

    Hi, Apple Mail provides a function to create sub-folders within my mailbox so that I can group emails of similar subjects or from the same sender. My service provider only provides POP email protocol and the New Folder button does not appear in my Apple Mail account for that service provider. Icloud provides the opportunity for the iPad user to select between POP and IMAP. I can select IMAP and the New Folder button appears allowing me to create sub-folders within the icloud email account. Does this mean I cannot create sub-folders in my email account unless my service provider provides customers with the option of creating an IMAP email account?
    This appears to be a problem for quite a few Apple Mail users, but service providers appear reticent to provide a response other than 'use Microsoft Exchange / Hotmail, Google GMail, or some other third party email service provider'. This is why I have chosen icloud as my email service provider. It is Apple and therefore Apple supports it. I have been a Telstra customer for over 15 years and they informed me today, strongly, that they support their own products and services, not Apple products, even though Telstra sell them. When I asked the Telstra Customer Support Manager whether they support Telstra customers, I was informed 'no, because the Telstra customer is not a Telstra product or service'. I have since cancelled my Telstra email account and am in the process of cancelling all of my Telstra services.

    Apple Sceptic wrote:
    Does this mean I cannot create sub-folders in my email account unless my service provider provides customers with the option of creating an IMAP email account?
    Yes. That is what it means. You need an IMAP account in order to create sub folders on the iPad.

  • Using Javascript to email a form in a workflow process

    I've created an Acroform which will be routed around in a workflow process.  The user will open the form, add information and hit a button which is coded in javascript usng the mailDoc function.
    It works perfectly EXCEPT that each time the document is forwarded, "Adobe Acrobat Pro.pdf" gets appended to the name of the file in the email.  It doesn't actually rename the file, so the file does open properly, but the email looks pretty goofy.
    Example.  The filename is Form14.pdf. 
    When the third person signs off and clicks the email button, the email is created, with the address, subject line and body of the email completed, and the document attached has the little icon and then
    - Form 14.pdf - Adobe Acrobat Pro.pdf - Adobe Acrobat Pro.pdf - Adobe Acrobat Pro.pdf
    Is there some way to prevent it from concatenating like this every time the document is emailed?
    Thanks!!!

    Maybe you could try it like this... I saw this question answered not too long ago.
    Submit Portal Form Values to Portal Report

  • Message Monitoring for each within the BPM process

    I have a question concerning message monitoring within a BPM process.  I receive an IDOC into my BPM process.  I then have three transformation steps before sending an E-mail to the end receiver.  When I look at the messages in the workflow log, I am unable to see the message after each transformation step.  In the log display if I click the instance ID for all steps except the first step I am unable to see a message.
    List of Message Objects
    Object Type              Instance    ID                          Creation Time
    ZXI_PROXY...0001     DC9F66530C7899F1AC430017A44943B2     11:04:39
    ZXI_PROXY...0001     DC9F66530C789FF1AC430017A44943B2     11:04:39
    ZXI_PROXY...0001     DC9F66530C78A5F1AC430017A44943B2     11:04:39
    ZXI_PROXY...0001     DC9F66530C78B1F1AC430017A44943B2     11:04:39
    ZXI_PROXY...0001     DC9F66530C78ABF1AC430017A44943B2      11:04:39
    ZXI_PROXY...0001     DC9F614BA98C51F1AC430017A44943B2      10:28:40
    If I click all except the first instance I receive the following message:
    No messages available for selection
    Message no. XMS_ADM113
    Is there a way to make the message persistent after each step within the process?  I would like to see the data after each step in the workflow log. Is this possible?
    I do receive the e-mail from the send step so I know that it's completing the process.  What I'm not sure of is if each step individually processed the data as I expected.

    Hi Audra,
    Check this link
    BPM monitoring
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e7bc3a5a-0501-0010-1095-eb47159e169c
    Sachin

  • Adding a record in a table from a workflow process

    Hi all,
    I need to add a recod in a table using a workflow. Here the scenario:
    A user add a record into table A, when done MDM trigger the workflow in Visio. The workflow has to add a record in table B coping some values of table A.
    Thank in advance for your help.
    Vito

    Hi Vito,
    I am really doubt that MDM has the feature of adding a record to an table thru workflow process, rather workflow process can be triggered as you said while creating a record.
    thanks
    Alexander

  • Own workflow process step (java) not listed in the generic Process step component

    Based on the description Extending Workflow Funtionality I have used this sample to create a bundle with the CRXDE Development Environment. Almost just copying the code from the page (had to make some adjustments to correct program errors in this sample) an then build bundle. According to Note 2 this program should be seen in the list supplied by Process step Component when editing a workflow. But it is not there.
    @Component
    @Service
    public class MyWorkflowProcess implements WorkflowProcess {
        @Property(value = "An example workflow process implementation.")
        static final String DESCRIPTION = Constants.SERVICE_DESCRIPTION;
        @Property(value = "Adobe")
        static final String VENDOR = Constants.SERVICE_VENDOR;
        @Property(value = "My Sample Workflow Process")
        static final String LABEL="process.label";
    What do I need to do else?
    Thanks,
    Ulrich

    Ulrich,
    CRXDE does not support the Java annotations which are listed in the documentations. When you want to leverage CRXDE (which is for development ... discouraged), you need to migrate to JavaDoc style annotations.
    For documentation how you can setup a development workflow based on a Java IDE and maven please see [0].
    kind regards,
    Jörg
    [0] http://dev.day.com/docs/en/cq/aem-how-tos/development/how-to-build-aem-projects-using-apac he-maven.html

  • Reading user input from a form within a workflow and perform actions in workflow based on the input

    Sharepoint 2013
    Need to get input from a user based on some condition within a workflow and based on the input received continue with the workflow. It can be a form with a text box and button to which i can redirect and when user enters a value and clicks on the button
    ,I should come back to the workflow and perform other processing. I should also be able to manually start this workflow from VS.
    Tried different approaches like initiation forms ,user input action of SP2010 etc all of these approaches either add some tasks to task list or force me to click on the workflow link to get input from a user.
    Any suggestions on this?

    Hello
    Thanks for the code, but I don't need an array of beans. By the way this code make a bean and an arraylist everytime it's called?
    I was looking for something like this:
    <form action="myjsp.jsp" method="post">
    ...so after submitting the result will go to the myjsp.jsp file and in the myjsp.jsp file
    <jsp:useBean id="value" class"myBean">
    <jsp:setpropertiy name"value" ....>so everytime I click the add button the values will go the mysjp.jsp file and that will set them in the javabean file. this method uses two files but I was looking for doing this in the same jsp file and not sending it to another file.
    chers
    Ehsan

  • Using in the workflow process the element of Scenario dimension which conta

    Good day All
    In the Scenario dimension has been created element which include as children the some store elements of the Scenario dimension (Plan, Fact ...).
    This element has been assigned as scenario element for Planning Unit Hierarchy.
    When we start the workflow process the children of its elements (Plan, Fact ...) still available for edit on work form for all users.
    Question. Work form contains several elements of Scenario. As in the workflow process close all of these elements, creating only one Planning Unit Hierarchy and run the process only once (in fact, one Scenario).
    thanks

    The total video bit rate is determined by audio & video. Depending on what rate your video file was encoded at will determine how much room is left for audio. PCM(aiff/wav) audio requires a bigger piece of the pie. Video bit rate too high means your overall(video+audio) rate is going above 9Mbps which the format won't allow. The only way to use aiff would be to lower your video file's data rate. The length of your program is also a factor in all of this.
    I had some problems in the past with using aiff instead ac3. Although there shouldn't be any issue I experienced playback issues on some players that couldn't be explained but were cleared up by ac3.  I have been using the same specs as Dave's suggestion for almost nine years and have not had any issues with mix, quality, or levels.

  • Using in workflow process the element of Account dimension with subordinate

    Good day All
    In the dimension Account has been created element, which contains several shared elements. This element has been added as a Parent member when creating a Planning Unit Hierarchy. When we run the workflow process the child shared elements still open for editing for all users.
    May be we can’t using shared members in this case?
    Thanks

    Are you the one who commented out the code you're looking for ?//String desc = StringFactory.getString(attributes.getValue("desc"));You just have to modify you AttributeObject class to hold a new field : String description. And then, it's up to you to create a new constructor or a new setter method.
    Btw, this is not a Swing related question.

Maybe you are looking for