Export Filter - processing in batches

I'm writing an export filter that uses an external tool to process the photos. The tool can/should be multithreaded and I want to take advantage of this by processing the images in groups of 2 or 4 or 8 (or whatever). This means that I gather the paths and the renditions to satisfy in a table and once the table reaches the desired size I process the images in the batch together, empty the table and continue.
For some reason I can't make this work. To illustrate, I've reduced this problem to this scenario (Example A)
1. While iterating filterContext:renditions() I copy the paths and renditionToSatisify to a table
2. Iterate over the table of copies and process the images one by one.
When running this, I'm getting this error:
This plug-in’s post-processing task did not finish successfully.
?:0: attempt to index field 'exportSettings' (a nil value)
It seems to me that LR doesn't like me to call "renditionIsDone" out of sequence but I don't know what to make of this.
I'm also adding "Example B" to show that if I call processOne right after adding its entry to the table all is well.
Example A
function processOne(table)
     local commandResult
     commandResult = PluginManager.doit({table.a})
     if commandResult ~= 0 then
         table.b:renditionIsDone( false, "Image Processing Failed (" ..  commandResult .. ")")
     else
         table.b:renditionIsDone (true,"very good indeed")
     end
end
function JPEGminiFilterProvider.postProcessRenderedPhotos( functionContext, filterContext )
  local renditionOptions = {
  plugin = _PLUGIN,
  renditionsToSatisfy = filterContext.renditionsToSatisfy,
  filterSettings = function( renditionToSatisfy, exportSettings )
  end,
  local maxGroupSize = 1
  local groupSize = 0
  local group = {}
  for sourceRendition, renditionToSatisfy in filterContext:renditions( renditionOptions ) do
  local success, pathOrMessage = sourceRendition:waitForRender()
  if success then
  groupSize = groupSize + 1
  group[groupSize]={a=pathOrMessage, b=renditionToSatisfy}
  end
  end
  for i,v in ipairs(group) do
  processOne(v)
  end
end
Example B
function JPEGminiFilterProvider.postProcessRenderedPhotos( functionContext, filterContext )
     local renditionOptions = {
         plugin = _PLUGIN,
         renditionsToSatisfy = filterContext.renditionsToSatisfy,
         filterSettings = function( renditionToSatisfy, exportSettings )
         end,
     local groupSize = 0
     local group = {}
     for sourceRendition, renditionToSatisfy in filterContext:renditions( renditionOptions ) do
         local success, pathOrMessage = sourceRendition:waitForRender()
         if success then
               groupSize = groupSize + 1
               group[groupSize]={a=pathOrMessage, b=renditionToSatisfy}
               processOne(group[groupSize])
         end
     end
end

I dunno the problem, but consider naming parameters something besides 'table' since that masks the global lua table object.
Rob

Similar Messages

  • Problem with EXPORT IMPORT PROCESS in ApEx 3.1

    Hi all:
    I'm having a problem with the EXPORT IMPORT PROCESS in ApEx 3.1
    When I export an application, and try to import it again. I get this error message
    ORA-20001: GET_BLOCK Error. ORA-20001: Execution of the statement was unsuccessful. ORA-06550: line 16, column 28: PLS-00103: Encountered the symbol "牃慥整㈰㈯⼴〲㐰〠㨷㐵㈺′䵐" when expecting one of the following: ( - + case mod new not null <an identifier> <a double-quoted delimited-identifier> <a bind variable> avg count current exists max min prior sql stddev sum variance execute forall merge time timestamp in
    As a workaround, I check the exported file and found this
    wwv_flow_api.create_flow
    p_documentation_banner=> '牃慥整⠤㈰㈯⼴〲㠰〠㨷㠵㈺′äµ
    And when I replace with this
    p_documentation_banner=> ' ',
    I can import the application without the error.
    somebody knows why I have to do this??
    Thank you all.
    Nicolas.

    Hi,
    This issue seems to have been around for a while:
    Re: Error importing file
    I've had similar issues and made manual changes to the file to get it to install correctly. In my case, I got:
    ORA-20001: GET_BLOCK Error. ORA-20001: Execution of the statement was unsuccessful.<br>ORA-02047: cannot join the distributed transaction in progress<br>begin execute immediate 'alter session set nls_numeric_characters='''||wwv_flow_api.g_nls_numeric_chars||'''';end;There are several suggestions, if you follow that thread, about character sets or reviewing some of the line breaks within pl/sql code within your processes etc. Not sure what would work for you.

  • In Exports sales process, how you configure the Duty Draw Back

    in my case
    we r creating Exports but
    duty unavailability of time and time taking process in export processing
    we are creating Excise invoice and cenvat is debited .
    now we r asking the govt. for the duty draw back for the value already cenvat is debited with proper documents like ARE1 etc.
    how to manage this duty back and what r the replications or changes thereafter
    thanks in advance

    Hi Sunitha,
    Pls can u explain how did u solve (In Exports sales process, how you configure the Duty Draw Back) this issue....since i don't have idea abt this...but shortly i am going to do this in my client place....
    thanks,

  • Export/Import Process in the UI for Variations Content Translation is Generating CMP Files with No XML

    We have a SharePoint 2010 Publishing Website that uses variations to deliver contain to multiple languages. We are using a third-party translation company to translate publishing pages. The pages are
    exported using the  export/import using the UI process described here: "http://blogs.technet.com/b/stefan_gossner/archive/2011/12/02/sharepoint-variations-the-complete-guide-part-16-translation-support.aspx".
    Certain sub-sites are extremely content-intensive. They may contain many items in the Pages library as well as lists and other sub-sites. 
    For some sub-sites (not all), the exported CMP file contains no XML files. There should be a Manifest.XML, Requirements.XML, ExportSettings.XML, etc., but there are none. After renaming the CMP file
    to CAB and extracting it, the only files it contains are DAT files.
    The only difference I can see between the sub-sites that generate CMP files with no XML files is size. For example, there is one site that is 114 MB that produces a CMP file with no XML files. Small
    sites do not have this problem. If size is the problem, then I would think the process would generate an error instead of creating a single CMP file that contains only DAT files. However, I do not know exactly what the Export/Import Process in the UI is doing.
    This leads to two questions:
    1.
    Does anyone know why some CMP files, when renamed to *.CAB and extracted, would not contain the necessary XML files?
    2. Second, if exporting using the UI will not work, can I use PowerShell? I have tried the Export-SPWeb, but the Manifest.XML does not contain translatable
    content. I have not found any parameters that I can use with Export-SPWeb to cause the exported CMP to be in the same format as the one produced by the Export/Import process in the UI.
    As a next step, we could try developing custom code using the Publishing Service, but before doing this, I would like to understand why the Export/Import process in the UI generates a CMP that
    contains no XML files.
    If no one can answer this question, I would appreciate just some general help on understanding exactly what is happening with the Export/Import Process -- that is, the one that runs when you select
    the export or import option in the Site Manager drop down. Understanding what it is actually doing will help us troubleshoot why there are no XML files in certain export CMPs and assist with determining an alternate approach.
    Thanks in advance
    Kim Ryan, SharePoint Consultant kim.ryan@[no spam]pa-tech.com

    I wanted to bump this post to see about getting some more responses to your problem. I'm running into the same problem as well. We're running a SharePoint 2010 site and are looking at adding variations now. The two subsites with the most content take a
    while to generate the .cmp file (one to two minutes of the browser loading bar spinning waiting on the file). Both files are generated with a lot of .dat files but no .xml files. I was thinking like you that it must be a size issue. Not sure though. Did you
    ever happen to find a solution to this problem?

  • Process Order -Batch determination for a BOM material(same batch)

    Hi Friends,
    Thanks in advance.
    Let us say, a material (ROH) has so many batches as A,B,C & D. Whenever we create a new process order, system has to pick only the particular batch( say -C here)  in the process order BOM through batch determination.  (during process order creation stage)
    1.How to achieve the same ?
    2. What are the ways are there to achieve the same ?
    3.Is there any Exit for this?
    Regards,
    Mani

    Hi Velmurugan & Vishwas,
    Thnaks for your feed back.
    1. Is there any other ways without batch classification ? ( Because there are so many material without MM-classification view.....and client wants without extending the Classification view for MM master as it suggests same batch for all GI for delivery & GR for purchase.....)...We want only for process order batch determination.....
    2. Is there any exit for this ?
    3. Is it possible through any kind of Characteristic assignment in the Sort sequence? How?
    Regards,
    Mani

  • How to export Business process and application area from Backend.

    Hi ,
    I am new to SAP. I want to export Business process, sub business process, and application area from backend SAP system to my desktop in the excel or flat file format. How can I do this ?? what are the transactions to do this ?.
    Thanks in advance for Reply

    Hi,
    You can deactivate the business process itself if you do not want at all. So that the header will not available for the entity.
    Regards,
    Priya

  • Process order batch number not reflecting in corresponding inspection lot

    Hi QM gurus,
    I am working on inprocess inspection for production. I am creating process order during that time batch no is generated automatically by the system. Now process order is released during this time Inspection lot generated with inspection type 03. Now the problem is in the inspection lot, process order batch number is not reflecting. I have checked all the master data seetings. All seems to be fine. what could be the problem. any settings missed can anybody help me out.
    Thanks
    Vinameath

    Hi Vinameath,
    Go to the Master Recipe (C202) of this Process order/Material. Go to Recipe Header tab and click on the Quality Management Header button.
    Now,go to the Partial Lot Assign field and maintain the value " 0 Partial Lots not supported " and save.
    Then create a new process order and in all probabilities, the batch should appear on the in-process inspection lot.
    Hope this helps you!
    Regards,
    Vinodh

  • Export Business Process in India Scenarios

    Hi ASAP,
    Can any ASAP guru gives me the Export Business Process in India Scenarios including ARE Doc. transaction.
    With Regards & Thanks
    Manoj Kumar

    Dear ASAP,
    The information which is given in CIN En Help, I am not able to understand, If you can give me the Process Flow as like given below for both Bonded and Un-Boned with ARE doc. creation, it will be much more help.
    Process Flow for Standard Outgoing Mat. with Excise.
           1.    creates a sales order,
           2.   creates a delivery,and post  the goods issue.
           3.   create commercial invoice with ref. of the delivery
           4.   Creates an excise invoice from the invoice.
    With Worm Reagrds
    Manoj

  • Export Return process

    please any one can tell me the steps to configure export return process, itss urgent.
    Regards
    Chilukri

    Already this topic was discussed so many times and please make a search.
    It is nothing special and as like normal sales returns where you need to create a return sale order referencing the billing document, do post goods receipt if need be and issuing credit note for the value of the returns.  Also in J1IH, you need to make excise adjustments.
    thanks
    G. Lakshmipathi

  • Export Return  process Configuration

    Hi   Consultants,
    Any  one plz help me to configure  Export Return process.
    Early help would be appreciable.
    Thanks in advance,
    Siva

    Already this topic was discussed so many times and please make a search.
    It is nothing special and as like normal sales returns where you need to create a return sale order referencing the billing document, do post goods receipt if need be and issuing credit note for the value of the returns.  Also in J1IH, you need to make excise adjustments.
    thanks
    G. Lakshmipathi

  • Export sales process

    Hello, I have configured a export sales process for my client. But they are asking me to modify it in such a way that, in smartform they want all the loading and unloading details. For ex, they are creating sales order and loading goods at bangalore and sending to cochin port by TRUCK, there goods get unloaded and from there they load again to container to ship. Then it is sent to the destination country. How to configure this about unloading at port and again loading from port.
      Also please mention the steps to be taken for executing export sales process.
    Thanks in Advance..

    Hi,
    In your case apart from the exports process as there is involvement of Transportation activity, we need to determine through which route the goods are sent and how the loading and unloading is taking place. So please configure for route determination referring to following links:
    http://help.sap.com/saphelp_nw04/helpdata/en/5a/34bd66c03d11d2851c0000e8a57770/content.htm
    http://www.sap-img.com/sap-sd/route-determination-in-sales-order.htm
    Regards
    DSR

  • Export Import Process

    Hi,
    Is it possible to maintain details for export and import of material in B1..? will it require any customization..?
    swapnil

    Hi Swapnil,
    i am not sure, if i understood you correct. Do you want to import / export data for B1 ? Or do you want to integrate an import / export logistic process into B1 ?.
    For data import you should use the Data Transfer Workbench. It normaly is installed into your SAP directory. There you will find a lot of examples and prepared sheets for import datas. For exporting data you could use SQL-Query as the simpelst way.

  • Exporting scheduled financial report batches with LCM

    Hi folks. Running 11.1.1.3 EPM here.
    I'm trying to use LCM to export scheduled Financial Reporting batches. When I am in Shared Services under Reporting and Analysis, under the Scheduled Objects drilldown, I don't see any scheduled objects yet I have about 200 FR batch reports scheduled on my dev server.
    Am I looking in the wrong place to export these or is there another way?
    Thanks,
    Tom

    Sorry I wan't aware the folder structure was different in 11.1.2. I found this on the LCM admin guide:
    Default value: This parameter is commented out and the Lifecycle Management engine uses the default file system location on the Shared Services computer; for example:
    MIDDLEWARE_HOME/user_projects/epmsystem1/import_export/username@ProviderName.
    Do you see it now?

  • Export BPMS process as jpeg/pdf

    Hi ,
    Am using JDeveloper 11gR1 with BPM plugin for modelling Business process. Is there a way to export the process as pdf/jpeg so that I can share the same with non IT folks ?
    Thanks,
    Naveen

    The only way I know of to get a print out is to publish your workflow to MDS. Then log into your bpm\composer and from there you can print your MDS (workflow). The only down side is that it only prints the canvas and no notes/documentation that might be associated with the workflow.

  • Export filter included in ExportService?

    Hi, I wrote a little export filter. Then I wrote a simple ExportService, both are declared in the Info.lua file.
    Now, I need that when the user select my ExportService, my ExportFilter is automatically included (not having to manually enable it in the Postprocess action window and when switching to another export preset and back to my ExportService, it disappears).
    How to do that?
    Thanks a lot
    Giuse

    Oh shoot ... didn't realize you were using shouldRenderPhoto. That function isn't supported in the export service provider API.
    I haven't tested this recently, but I think you can do what you're trying to do in your processRenderedPhotos function.
    Something like:
    function processRenderedPhotos( functionContext, exportContext )
        exportContext.exportSession:removePhoto( unwantedPhoto )
              -- This has to proceed your
              -- exportContext:renditions{...} call
    end
    Note: This is just taken off the cuff from a sample plug-in I have around. I haven't tested it, so it might need some tweaking, but the basic principle should be right.
    Hope this helps ...
    P.S. You should be able to call :removePhoto multiple times (prior to the :renditions call) to remove multiple photos.

Maybe you are looking for