Accessing Attachments on the first Action in a 7.2 WF

A user fills out a form in Form Manager and they have attached some files to the workflow. The first step in the workflow is a script QPAC which needs to manipulate the attachments (need to extract the attachments, reader extend them and put the back...). If the first step were a user task in 7.2, you can copy the attachments to a document list from the previous step but if the first step in the workflow is a script, how do you access the attachments?
Ideally we would like to have all of the attachemnts available in a document list at the very first step of the workflow or at lest some mechanism to put them into a document list.

Chris, thanks for your suggestions. The code you supplied does allow the initial user task to be retrieved.
I'm having some difficulty getting the attachments out of the task object in a usable format.
task.getAttachments() returns a java.util.Collection according to the documentation. However, this seems to be wrong. It actually returns POFObjectSetWrapper which is undocumented. If you try to set a workflow variable with the return value from getAttachments() you get an error.
eg.
Collection list = task.getAttachments();
patExecContext.setProcessDataListValue("/process_data/attachments", list);
This gives you an error that it cannot coerce BOITaskAttachment objects to Document objects. "/process_data/attachments" is a Document List variable.
So I figured I need to iterate through the POFObjectSetWrapper object and create a new collection of document objects.
eg.
Collection docs = null;
for (Iterator it=list.iterator();it.hasNext();){
BOITaskAttachment att = it.next();
Document d = new Document(att.getContent());
docs.add(d);
This gives an error because altho the documentation indicates that the return from getAttachments() is a collection POFObjectSetWrapper does not seem to implement Collection. Nor does it implement POFObjectSet which would allow us to do the following:
while (list.next() ) {
BOITaskAttachment att = (BOITaskAttachment) atts.getBOIObject();
Document d = new Document(att.getContent());
docs.add(d);
I need to get the attachments into Workflow Variables... preferably a List of Documents.
Can anyone shed any light on how to do this?
4Point Solutions

Similar Messages

  • JSF: Accessing Page for the first time

    Hi,
    I found out that accessing a JSP page(developed with JSF tags ) for the first time does not display any output. Either the page has to be refreshed or re-submitted. Am I missing something here or is it a known functionality ?
    Configuration
    Web-Container: Tomcat 4.1
    IDE: Jbuilder 9.0
    Regards,
    Priyesh

    Hi,
    I found out that accessing a JSP page(developed with
    JSF tags ) for the first time does not display any
    output. Either the page has to be refreshed or
    re-submitted. Am I missing something here or is it a
    known functionality ?You need to access the page behind a "/faces" prefix. For example, if you've got JavaServer Faces component tags on a page named "/foo.jsp", your URL should be something like:
    http://localhost:8080/myapp/faces/foo.jsp
    Craig

  • I cannot access my email - sending a new password is rather pointless when I cannot access it in the first place. How can I access my email?

    I cannot open any new email. My old email is in the box but nothing new has come thru since yesterday

    Hi StuNYC,
    Welcome to Apple Support Communities.
    It sounds like you're seeing an alert message when opening Mail on your iOS devices. Do you have multiple email accounts setup on the devices? Take a look at the article below, it provides suggestions that will resolve most issues that  cause an alert like that to appear in when starting the Mail app.
    iOS: Troubleshooting Mail
    http://support.apple.com/kb/ts3899
    I hope this helps.
    -Jason

  • How to update the form bean after the first submission?

    Hi all,
    I am trying to refresh the data that have been retrieved from database to a jsp page. The first action class is retrieving data from database and display them in the jsp page. In the same jsp page I want to create a button where a user can click to refresh the data that has been update in the database side. This is done by second action class. Please let me know as this problem is hitting my head.
    The first action class
    public class StateResultAction extends BaseAction{
         private int year;
         private int month;
         public  ActionForward process(ActionMapping mapping,
                           ActionForm form,
                           HttpServletRequest request,
                           HttpServletResponse response) throws Exception
              String forwardPage = "";
              Vector data = null;
              Log log = getLogger();
              StateForm stateForm = ((StateForm)form);
              log.debug("in StateResultAction:"+stateForm);
              try {
                   year = stateForm.getStartYear();
                   month = stateForm.getStartMonth();
                   StateBusLogic  busLogic = new StateBusLogic(stateForm);
                   if(stateForm.getSt().startsWith("98")){
                        data = busLogic.getBalance2();
                   }else{
                        data = busLogic.getBalance();
                   log.debug("size of data:"+data.size());
                   request.getSession().setAttribute("data", data);
              }catch (Exception e){
                   log.error("Exception occur while query the balance:"+e);
                   forwardPage = "error";
              request.getSession().setAttribute("startDate", fmrsForm.getStartDate());
              request.setAttribute("endDate",stateForm.getEndDate());
              request.setAttribute("st", stateForm.getSt());
                        if (stateForm.getProgNum() == 0 )
                   forwardPage = "state";
              else
                   forwardPage = "sub-state";
              return mapping.findForward(forwardPage);
    }The second action class for Refreshing the same jsp page and getting the new data that just being entered in the database is
    public class StateRefreshAction extends BaseAction {
         public ActionForward process(ActionMapping mapping, ActionForm form,
                        HttpServletRequest request, HttpServletResponse response) throws Exception {
              return mapping.findForward("state");
    }

    http://forum.java.sun.com/thread.jspa?threadID=5147813&messageID=9553925#9553925

  • TS1717 I recentlu upgraded to the latest itunes version, I have now tried to open itunes for the first time since upgrading, no I find I have not got permission to open itunes. It will not launch at all???? Any ideas???

    I have recently upgraded to the latest version of itunes. I have just tried to access itunes for the first time since upgrading and now I get a message saying I do not have the appropriate permissions to access it. It will not launch at all. I have also recently changed my ISP, help anyone?

    This is the iPod touch forum. I requested the moderators to move your post to the iPod classic forum.

  • First Action in SelectOneMenu doestn't work after download link action

    Hi
    I have a commandLink for to download all the pdf files in a csv file through a servlet action. After that action is completed, when I try to select an option from selectOneMenu, the action seems to occur, i.e. the flash happens, but the option is not changed. That means it doesn't go to the processValueChange action. The second time when we select, the option gets selected. So the first action after clicking the download link doesn;t happen. It happens the second time.
    Here is the code for download link and action
    <h:commandLink action="#{ManualsBean.downloadAsCsv}">
    <h:outputText styleClass="sesOutputText"               value="#{text.download1}"></h:outputText>
    </h:commandLink>
    public void downloadAsCsv () {
    HttpServletRequest request = (HttpServletRequest) FacesContext
            .getCurrentInstance ().getExternalContext ().getRequest ();
        HttpServletResponse response = (HttpServletResponse) FacesContext
            .getCurrentInstance ().getExternalContext ().getResponse ();
        try
          request.getSession ().setAttribute ( "file_contents", documentList );
          FacesContext.getCurrentInstance ().getExternalContext ().redirect (
              request.getContextPath () + "/DownloadCsv" );
          FacesContext.getCurrentInstance ().renderResponse ();
          FacesContext.getCurrentInstance ().responseComplete ();
        catch ( IOException e )
          e.printStackTrace ();
        FacesContext.getCurrentInstance ().renderResponse ();
    }May I please know what else I can do to make the processValueChange action happen the first time itself after the servlet download link action
    Appreciate any feedback on this. Thanks

    The refresh button resets form fields to their initial values. If when the page is first displayed the form fields start out empty and submitting the form causes the page to be redisplayed with the form fields filled in, the reset button will appear to work differently. In both cases it is setting the fields to the values they had when the form was loaded (in effect undoing any changes the user may have made).

  • Misspelled email address when login to iPhone for the first time

    Hello everyone,
    I have quite a big issue with my iPhone (I have iPhone 5c).
    When I was creating my apple id for iPhone for the first time (after I purchased it)  I added an unexisting email address by accident (I never had or used that email as a domain I misspelled does not even exist...).
    Now I cannot access my phone at all (I needed to change a SIM card) and when I turned my phone back on, it showed that my phone was assigned for a particular apple id that is impossible to use - as an email (which is also an apple id in that case) and its domain,do not exist ...(it was even impossible to verify password after I accessed iPhone for the first time).
    I did not realized I cannot switch it to the other id to unlock my phone...as to change main apple id I would have to do it through the old one and this is - as I stated above - not possible at all ...
    using iCloud is also impossible for an above reason (cannot log in as I couldn't verify my password for main apple id).
    I have an additional apple id I use for an AppStore (that's how I managed to log in here)
    Does anyone have any idea/advise what are my options now?
    I am unable to use my phone at all because of that
    Thanks in advance!

    If you turned on Find My iPhone turn it off, then Settings > General > Reset > Erase All Contents & Settings.

  • I just statred Flash CC for the first time and it seems that the text within the pop-up window (dialog box) is mis-aligned and not allowing me access to the command buttons, nor all the text. (ie: the NEW Template Box, can't see but 2/3 of the content)

    I just statred Flash CC for the first time and it seems that the text within the pop-up window (dialog box) is mis-aligned and not allowing me access to the command buttons, nor all the text. (ie: the NEW Template Box, can't see but 2/3 of the content) is there a fix to this problem? using 8.1, Monitor is a high res.2560x1440.

    Another View.
    the GUI is so hard to read (so small) I enlarge my Ps UI by the instructions below...which helped a lot.

  • An error has occurred while accessing SQL database or system resources. If this is the first time you have seen this message, please try again later. If this problem persists, please contact your administrator.

    I have SP Server 2010, and when I try to DELETE a rule within an existing Audience, "Property (Account Name) = domain/username", I get this error, "An error has occurred while accessing SQL database or system resources. If this
    is the first time you have seen this message, please try again later. If this
    problem persists, please contact your administrator."  When I try to "MODIFY" the rule I get this error, "One or more values typed on this page are not valid. Check the text for the indicated fields." 
    The last time I checked it was working, I'm not aware of any new updates installed recently?  I did a full Profile Synchronization as well, but still not working, please advise? -- Evenstarline

    Hi Sara,
    First of all thank you very much for your prompt responses. Here are my comments to each of your suggestions below, and just to let you know I am using a Farm Admin account.  I
    was able to do this way after we upgraded from SP 2007 to SP 2010 as well.   I would like to mention I'm not a SP expert, just been given the responsibility due to another person handling it just left, so apologize with some of
    my novice questions below?
    1. When I change the Operators to "Contains" or "Not Contains" get generates this error below.
         Error generating in red towards top of the audience page..."One or more values typed on this page are not valid.  Check the text for the indicated fields."
         Error occurred where you enter your "Value"..."Could not resolve the user identity. Please re-enter the account name."
    2. We have a 3-server-tier topology (SPWeb, SPDB, and SPFarm).  Does the updates only apply to where the Central Admin is installed, which is the "SPFarm"?  I checked all
    3 servers, and NONE of the updates (KB2899494, KB2889845, and KB2883055) you'd mentioned are installed.
    3. I'm new to IISRET, I need to be extra cautious of what I run in production, is this safe to run with no problem?  What does it do?  And How do I run it?
    4. I'm also new to viewing the ULS log.  I'd just downloaded a viewer for it.  I'm assuming the only logs I need to be concern with viewing are within the SPAdmin (where Central
    Admin is installed)?  There's so many of them, what should I be looking for exactly?
    Evenstarline 

  • When I open a second Profile while another is running the second cannot access the Internet until I close the first. Why?

    I often have occasions to run more than one Profile simultaneously (usually because of different add-ons I've installed on different Profiles). In the past this worked fine. Now, all of a sudden, if I open a second Profile while the first is running the second cannot access the Internet until I close the first. It keeps looking for a website, and failing, until the system "times out". If I close the first Profile, the second is then able to access the Internet.
    Note: this is not a problem with opening a second Window in Firefox. As long as they are from the same Profile they will both work fine. Nor does this stop me from using a second Profile to look at website files I have saved to my computer. The only problem is that the second Profile cannot get on the Internet.

    I just checked, the setting was for "Automatic proxy configuration URL", in the past it was set on "No Proxy". So I'll try changing that (and/or try other proxy options), and see if that solves the problem.
    If it does, then just one (academic) question remains: why did that happen in the first place? I don't care what the answer is, so long as your suggestion solves the problem.
    Thanks.

  • I cannot access my old email address anymore, however I have used it for my apple ID and now I want to delete it because the account has never been verified in the first place so my password for it doesn't work. What do I do?

    I cannot access my old email address anymore, however I have used it for my apple ID and now I want to delete it because the account has never been verified in the first place so my password for it doesn't work. So when I want to download apps I have to sign in with apple id but I can't so I made a new one, However I can't seem to be able to delete the old one. What do I do?

    You can't merge Apple IDs.  You also can't cancel (delete) and existing ID, you can only choose to stop using it.
    If your old ID was compromised and you can no longer access it, you'll have to contact Apple for assistance.  Go to https://expresslane.apple.com ; click 'See all products and services' at the bottom of the page. In the next page click 'More Products and Services, then 'Apple ID'. In the next page select 'Other Apple ID Topics' then then 'Apple ID account Security’.

  • I can't access iCloud, i keep getting a message to try again later. This is the first time i have tried to log into icloud. I  know my account is working, i want to access it from my macbook. I think its looking for my old icloud email, what to do?

    I can't access iCloud, i keep getting a message to try again later. This is the first time i have tried to log into icloud. I  know my account is working, i want to access it from my macbook. I think its looking for my old icloud email, what to do? I have a working apple id, i dont understand, could it be linked to an old account iD?

    Hi smccarrison,
    Thanks for visiting Apple Support Communities.
    You may find the steps in this article helpful with troubleshooting signing into iCloud:
    iCloud: Account troubleshooting
    http://support.apple.com/kb/TS3988
    All the best,
    Jeremy

  • I logged in to pay my bill via the app yesterday and my stored form of payment was gone. Since I wasnt at home I didnt have access to my checking account now nor a credit card. This is the first time in 14 years that my online account has had this issue a

    I logged in to pay my bill via the app yesterday and my stored form of payment was gone. Since I wasnt at home I didnt have access to my checking account now nor a credit card. This is the first time in 14 years that my online account has had this issue and NO my stored card is not expired. My payment is now going to be late and i was going to get a new phone oin the Edge plan too. Am I going to get charged a late fee and does tgis affect my eligibilityafter 14 years of on time payments! And why did you wipe out my stored payment info?

    Ratwurkz,
    Oh my goodness! That is not what we like to hear. Were you able to log in online not through the My Verizon App? Did it show the card available in there? Is this the same card that you have used for past payments? Let's look a little closer.
    RobinD_VZW
    Follow us on twitter @VZWSupport

  • Automator - When using the Render PDF as Image action, the first file is out of order (naming).  How can I fix this?

    I am creating an Automator Action to render PDF files as Images.  When the PDF is multiple pages, the first page has no numbers, so it ends up at the end of the list.  Here's an example:
    When it is a single page, the result is:
    filename.png
    When it is multiple pages, the result is:
    filename 141.png
    filename 142.png
    filename 143.png
    filename 144.png
    filename.png
    First, it always seems to start at 141...not sure why.
    Second, I did try to add an action to rename and make sequential, however the resulting list was in the same order... except with additional numbers at the end.
    Any suggestions?

    I see. 
    This worked when I tested on 1 PDF:
    The Run Shell Script Action is:
    basename=${1##*/}
    echo ${basename%.*}
    If it's still out of order, add: Sort Finder Items [by creation date] after Render PDF Pages as Images

  • I live in Nepal. I can access for the first time at the time of using itunes. There isnt option of NONE in the payment mode.Please Help Me Out !

    I live in Nepal. I can access for the first time at the time of using itunes. There isnt option of NONE in the payment mode.Please Help Me Out !

    AshimPoudel wrote:
    I have problem still. Is this payment important to create a free apple ID???
    Not sure what you are asking...
    Apple ID FAQs
    http://support.apple.com/kb/HE37

Maybe you are looking for