EktaVegad
3 Argentium

Re: Ask the Expert: D2 Configuration options, Matrix selection & Plugin Development

Hi D2 Expert,

I am facing some issues in uniqueness , like while editing some numeber fields on which I have applied uniqueness, is giving

warning message on duplicate number which is required & also not allow user to click on "ok" button till the time he is not entering the unique number.

But if user clicking on cancel, will save the duplicate number as attribute value.

Please sugeest some possible scenerio.

Regards,

Ekta

0 Kudos
Mayur_shivs
3 Argentium

Re: Ask the Expert: D2 Configuration options, Matrix selection & Plugin Development

Hi

Pinal Shah

I was trying to install D2 Custom method as a module using documentum composer

below is the method class

import java.io.ByteArrayOutputStream;

import java.util.Locale;

import com.documentum.fc.client.IDfModule;

import com.documentum.fc.client.IDfNote;

import com.documentum.fc.client.IDfSession;

import com.documentum.fc.client.IDfSysObject;

import com.emc.common.java.utils.ArgumentParser;

import com.emc.d2.api.methods.D2methodBean;

import com.emc.d2.api.methods.ID2Method;

public class D2CustomMethod  implements IDfModule, ID2Method {

  @Override

  public D2methodBean execute(IDfSession session, IDfSysObject sysObject,

  Locale local, ArgumentParser parser) throws Exception {

  sysObject.setKeywords(0, "mayur");

  String objectPath = sysObject.getPath(0);

  IDfNote note = (IDfNote) session.newObject("dm_note");

  note.setContentType("crtext");

  byte b[] = {35,36,37,38,39};

  ByteArrayOutputStream out = new ByteArrayOutputStream();

  out.write(b, 0, 5);

  note.setContent(out);

  note.setString("keywords", "Noter");

  note.setString("title", "Note");

  note.save();

  return null;

  }

}

3) I created jar definition of this class

4) Created standard module and specified jar definition and implementation class

5)  Created method artifact for this method with the same name as module and installed it

with this procedure i am not able to view the installed method either by DA or by Workflow manager

can you provide the detailed methodology to follow for installing D2 custom method as a module

Regards

Mayur Mitkari

0 Kudos
shahsank
2 Bronze

Re: Ask the Expert: D2 Configuration options, Matrix selection & Plugin Development

Please check that the method is visible in D2-Config.This is the standard procedure and to verify it please import some out of the box method into your composer and check the composer.

Regards

Shashank

0 Kudos
AnuragJain1983
1 Copper

Re: Ask the Expert: D2 Configuration options, Matrix selection & Plugin Development

Dear experts,

For lifecycle entry condition, I am using Condition check by using method. In case of success my below method returns null and in case of failure I create an object of D2methodBean

D2methodBean execute

But in both cases I am getting the failure message configured in Lifecycle. Is my above understanding correct or do i need to send different values in success or failure?

Regards,

Anurag

0 Kudos
shahsank
2 Bronze

Re: Ask the Expert: D2 Configuration options, Matrix selection & Plugin Development

We attach the lifecycle to our document by going to creation

0 Kudos
Highlighted
AnuragJain1983
1 Copper

Re: Ask the Expert: D2 Configuration options, Matrix selection & Plugin Development

I have a different problem then. Maybe experts might know solution for my problem

0 Kudos
AnuragJain1983
1 Copper

Re: Ask the Expert: D2 Configuration options, Matrix selection & Plugin Development

Could someone let me know what shall be the return parameters for D2Method in case of success or failure when using it as a condition for entry criteria of a lifecycle?

Also the session passed in execute method, is it by default under transaction? Or just we need to take session manager and make the transaction active

0 Kudos
Joydeep85
2 Bronze

Re: Ask the Expert: D2 Configuration options, Matrix selection & Plugin Development

"Could someone let me know what shall be the return parameters for D2Method in case of success or failure when using it as a condition for entry criteria of a lifecycle?"

Ans :-

public D2methodBean execute(IDfSession sessionAdmin, IDfSysObject docObject, Locale locale, ArgumentParser argumentParser) throws Exception

{

  D2methodBean result = null;
  boolean success = false;
 

  success = YourCustomMethod(Session, arg1,arg2,.....);
  if (success)
   result = new D2methodBean(0, "");
  else {
   result = new D2methodBean(-1, "");
  }

  return result;

}

AnuragJain1983
1 Copper

Re: Ask the Expert: D2 Configuration options, Matrix selection & Plugin Development

Thanks that worked.

For jobs, I am using C6Logger just like D2 jobs use, but don't see my logs in DA, View job report even though the trace level is set high.

Whats the practice with this?

0 Kudos
AnuragJain1983
1 Copper

Re: Ask the Expert: D2 Configuration options, Matrix selection & Plugin Development

Can the Score/Ranking column be moved to a different spot than the 2nd? I tried modifying d2c_preferences but but still it always appears at 2nd spot.

Seems it is hard coded somewhere. Any idea how to re position it for quick search

0 Kudos